首页 文章 精选 留言 我的

精选列表

搜索[系统工具],共10000篇文章
优秀的个人博客,低调大师

总结关于登陆ECS的三种方式(Linux系统)

在本人实际工作中遇到了三种不同的Linux服务器登陆方式,由简单到复杂分别阐述: 1.最简单的root账号密码登陆 通过root账号+root密码登陆Linux服务器 2.普通用户登陆 通过普通用户登陆到服务器上,如果要使用sudo的权限就需要切换到root账号上去 3.公钥私钥免密码的方式登陆可以分为2种 ①把本地主机公钥输入到被登陆的服务器上(这个是最常见,也是最保险的免密码登陆方式,不过如果是多台服务器的话,就需要添加本地主机的公钥到多台的被登陆的服务器上去) ②把被登陆的服务器的私钥提供给本地主机(这种方式可以应用在管理多台服务器上,如果所有远程服务器都设置成同一个公钥,用一个私钥就可以登陆所有的服务器上了) 以上三种方式都和SSH中的配置文件(/etc/ssh/sshd_config)有关 1.都是默认配置,不需要多加叙述,需要开启PermitRootLogin yes即可 2.刚好和上面的配置相反,需要关闭PermitRootLogin no,重启SSH服务器(在此之前需要添加普通用户) 当需要用到root权限时,执行su – root就可以了。 3.可以和前二种方式共存,也可以只进行公钥私钥登陆,只需要控制PasswordAuthentication选项就可以了 PasswordAuthentication no(不允许账号密码登陆) PasswordAuthentication yes(允许账号密码登陆) ①AuthorizedKeysFile 指定存放公钥的路径,把要登陆服务器的主机公约新增到此文件中 ②AuthorizedKeysFile 指定存放公钥的路径,登陆服务器时使用的就是被登陆服务器的私钥(目的就是用登陆主机上的私钥匹配被登陆服务器上的公钥)

优秀的个人博客,低调大师

校园交易平台后台系统git操作全过程

项目初始化 Shusheng Shi@PC-of-sss MINGW64 /h/mmall $ touch README.md Shusheng Shi@PC-of-sss MINGW64 /h/mmall $ touch .gitignore Shusheng Shi@PC-of-sss MINGW64 /h/mmall $ git init Initialized empty Git repository in H:/mmall/.git/ Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git status On branch master Initial commit Untracked files: (use "git add <file>..." to include in what will be committed) .gitignore README.md pom.xml src/ nothing added to commit but untracked files present (use "git add" to track) Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git add . warning: CRLF will be replaced by LF in .gitignore. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in pom.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/webapp/WEB-INF/web.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/webapp/index.jsp. The file will have its original line endings in your working directory. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git status On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: .gitignore new file: README.md new file: pom.xml new file: src/main/webapp/WEB-INF/web.xml new file: src/main/webapp/index.jsp Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git commit -am 'first commit init project' [master (root-commit) 0383eae] first commit init project 5 files changed, 69 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 pom.xml create mode 100644 src/main/webapp/WEB-INF/web.xml create mode 100644 src/main/webapp/index.jsp Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git remote add origin git@gitee.com:shushengshi/mmall_learning.git Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git branch * master Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git push -u origin master To gitee.com:shushengshi/mmall_learning.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@gitee.com:shushengshi/mmall_learning.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git pull warning: no common commits remote: Counting objects: 3, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From gitee.com:shushengshi/mmall_learning * [new branch] master -> origin/master There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> master Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git push -u origin master To gitee.com:shushengshi/mmall_learning.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@gitee.com:shushengshi/mmall_learning.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git push -u -f origin master Counting objects: 11, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (11/11), 1.22 KiB | 0 bytes/s, done. Total 11 (delta 0), reused 0 (delta 0) To gitee.com:shushengshi/mmall_learning.git + 1e43320...0383eae master -> master (forced update) Branch master set up to track remote branch master from origin. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git branch * master Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git branch -r origin/master Shusheng Shi@PC-of-sss MINGW64 /h/mmall (master) $ git checkout -b v1.0 origin/master Switched to a new branch 'v1.0' Branch v1.0 set up to track remote branch master from origin. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git branch master * v1.0 Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git push origin HEAD -u Total 0 (delta 0), reused 0 (delta 0) To gitee.com:shushengshi/mmall_learning.git * [new branch] HEAD -> v1.0 Branch v1.0 set up to track remote branch v1.0 from origin. 配置文件完成 Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: pom.xml modified: src/main/webapp/WEB-INF/web.xml Untracked files: (use "git add <file>..." to include in what will be committed) src/main/java/ src/main/resources/ src/main/webapp/WEB-INF/dispatcher-servlet.xml no changes added to commit (use "git add" and/or "git commit -a") Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git add . warning: CRLF will be replaced by LF in pom.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/webapp/WEB-INF/web.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/CartMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/CategoryMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/OrderItemMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/OrderMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/PayInfoMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/ProductMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/ShippingMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/UserMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/Cart.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/Category.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/Order.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/OrderItem.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/PayInfo.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/Product.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/Shipping.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/pojo/User.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/applicationContext-datasource.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/applicationContext.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/generatorConfig.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/CartMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/CategoryMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/OrderItemMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/OrderMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/PayInfoMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/ProductMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/ShippingMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/UserMapper.xml. The file will have its original line endings in your working directory. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: pom.xml new file: src/main/java/com/mmall/dao/CartMapper.java new file: src/main/java/com/mmall/dao/CategoryMapper.java new file: src/main/java/com/mmall/dao/OrderItemMapper.java new file: src/main/java/com/mmall/dao/OrderMapper.java new file: src/main/java/com/mmall/dao/PayInfoMapper.java new file: src/main/java/com/mmall/dao/ProductMapper.java new file: src/main/java/com/mmall/dao/ShippingMapper.java new file: src/main/java/com/mmall/dao/UserMapper.java new file: src/main/java/com/mmall/pojo/Cart.java new file: src/main/java/com/mmall/pojo/Category.java new file: src/main/java/com/mmall/pojo/Order.java new file: src/main/java/com/mmall/pojo/OrderItem.java new file: src/main/java/com/mmall/pojo/PayInfo.java new file: src/main/java/com/mmall/pojo/Product.java new file: src/main/java/com/mmall/pojo/Shipping.java new file: src/main/java/com/mmall/pojo/User.java new file: src/main/resources/applicationContext-datasource.xml new file: src/main/resources/applicationContext.xml new file: src/main/resources/datasource.properties new file: src/main/resources/generatorConfig.xml new file: src/main/resources/logback.xml new file: src/main/resources/mappers/CartMapper.xml new file: src/main/resources/mappers/CategoryMapper.xml new file: src/main/resources/mappers/OrderItemMapper.xml new file: src/main/resources/mappers/OrderMapper.xml new file: src/main/resources/mappers/PayInfoMapper.xml new file: src/main/resources/mappers/ProductMapper.xml new file: src/main/resources/mappers/ShippingMapper.xml new file: src/main/resources/mappers/UserMapper.xml new file: src/main/resources/mmall.properties new file: src/main/webapp/WEB-INF/dispatcher-servlet.xml modified: src/main/webapp/WEB-INF/web.xml Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git commit -am 'project init commit' [v1.0 ff5f0ba] project init commit 33 files changed, 3048 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/mmall/dao/CartMapper.java create mode 100644 src/main/java/com/mmall/dao/CategoryMapper.java create mode 100644 src/main/java/com/mmall/dao/OrderItemMapper.java create mode 100644 src/main/java/com/mmall/dao/OrderMapper.java create mode 100644 src/main/java/com/mmall/dao/PayInfoMapper.java create mode 100644 src/main/java/com/mmall/dao/ProductMapper.java create mode 100644 src/main/java/com/mmall/dao/ShippingMapper.java create mode 100644 src/main/java/com/mmall/dao/UserMapper.java create mode 100644 src/main/java/com/mmall/pojo/Cart.java create mode 100644 src/main/java/com/mmall/pojo/Category.java create mode 100644 src/main/java/com/mmall/pojo/Order.java create mode 100644 src/main/java/com/mmall/pojo/OrderItem.java create mode 100644 src/main/java/com/mmall/pojo/PayInfo.java create mode 100644 src/main/java/com/mmall/pojo/Product.java create mode 100644 src/main/java/com/mmall/pojo/Shipping.java create mode 100644 src/main/java/com/mmall/pojo/User.java create mode 100644 src/main/resources/applicationContext-datasource.xml create mode 100644 src/main/resources/applicationContext.xml create mode 100644 src/main/resources/datasource.properties create mode 100644 src/main/resources/generatorConfig.xml create mode 100644 src/main/resources/logback.xml create mode 100644 src/main/resources/mappers/CartMapper.xml create mode 100644 src/main/resources/mappers/CategoryMapper.xml create mode 100644 src/main/resources/mappers/OrderItemMapper.xml create mode 100644 src/main/resources/mappers/OrderMapper.xml create mode 100644 src/main/resources/mappers/PayInfoMapper.xml create mode 100644 src/main/resources/mappers/ProductMapper.xml create mode 100644 src/main/resources/mappers/ShippingMapper.xml create mode 100644 src/main/resources/mappers/UserMapper.xml create mode 100644 src/main/resources/mmall.properties create mode 100644 src/main/webapp/WEB-INF/dispatcher-servlet.xml rewrite src/main/webapp/WEB-INF/web.xml (93%) Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git push Counting objects: 46, done. Delta compression using up to 4 threads. Compressing objects: 100% (43/43), done. Writing objects: 100% (46/46), 19.54 KiB | 0 bytes/s, done. Total 46 (delta 17), reused 0 (delta 0) To gitee.com:shushengshi/mmall_learning.git 0383eae..ff5f0ba v1.0 -> v1.0 用户模块完成 Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: pom.xml modified: src/main/java/com/mmall/dao/UserMapper.java modified: src/main/resources/logback.xml modified: src/main/resources/mappers/UserMapper.xml modified: src/main/webapp/WEB-INF/dispatcher-servlet.xml modified: src/main/webapp/WEB-INF/web.xml Untracked files: (use "git add <file>..." to include in what will be committed) src/main/java/com/mmall/common/ src/main/java/com/mmall/controller/ src/main/java/com/mmall/service/ src/main/java/com/mmall/util/ no changes added to commit (use "git add" and/or "git commit -a") Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git add . warning: CRLF will be replaced by LF in pom.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/UserMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/UserMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/webapp/WEB-INF/web.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/common/Const.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/common/ResponseCode.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/common/ServerResponse.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/common/TokenCache.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/controller/backend/UserManageController.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/controller/portal/UserController.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/IUserService.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/impl/UserServiceImpl.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/util/MD5Util.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/util/PropertiesUtil.java. The file will have its original line endings in your working directory. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: pom.xml new file: src/main/java/com/mmall/common/Const.java new file: src/main/java/com/mmall/common/ResponseCode.java new file: src/main/java/com/mmall/common/ServerResponse.java new file: src/main/java/com/mmall/common/TokenCache.java new file: src/main/java/com/mmall/controller/backend/UserManageController.java new file: src/main/java/com/mmall/controller/portal/UserController.java modified: src/main/java/com/mmall/dao/UserMapper.java new file: src/main/java/com/mmall/service/IUserService.java new file: src/main/java/com/mmall/service/impl/UserServiceImpl.java new file: src/main/java/com/mmall/util/MD5Util.java new file: src/main/java/com/mmall/util/PropertiesUtil.java modified: src/main/resources/logback.xml modified: src/main/resources/mappers/UserMapper.xml modified: src/main/webapp/WEB-INF/dispatcher-servlet.xml modified: src/main/webapp/WEB-INF/web.xml Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git commit -am '用户模块' [v1.0 cf30e25] 用户模块 16 files changed, 828 insertions(+), 35 deletions(-) create mode 100644 src/main/java/com/mmall/common/Const.java create mode 100644 src/main/java/com/mmall/common/ResponseCode.java create mode 100644 src/main/java/com/mmall/common/ServerResponse.java create mode 100644 src/main/java/com/mmall/common/TokenCache.java create mode 100644 src/main/java/com/mmall/controller/backend/UserManageController.java create mode 100644 src/main/java/com/mmall/controller/portal/UserController.java create mode 100644 src/main/java/com/mmall/service/IUserService.java create mode 100644 src/main/java/com/mmall/service/impl/UserServiceImpl.java create mode 100644 src/main/java/com/mmall/util/MD5Util.java create mode 100644 src/main/java/com/mmall/util/PropertiesUtil.java Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git push Counting objects: 35, done. Delta compression using up to 4 threads. Compressing objects: 100% (30/30), done. Writing objects: 100% (35/35), 9.47 KiB | 0 bytes/s, done. Total 35 (delta 10), reused 0 (delta 0) To gitee.com:shushengshi/mmall_learning.git ff5f0ba..cf30e25 v1.0 -> v1.0 商品模块完成 Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: src/main/java/com/mmall/common/Const.java modified: src/main/java/com/mmall/dao/ProductMapper.java modified: src/main/java/com/mmall/util/PropertiesUtil.java modified: src/main/resources/mappers/ProductMapper.xml modified: src/main/webapp/index.jsp Untracked files: (use "git add <file>..." to include in what will be committed) src/main/java/com/mmall/controller/backend/ProductManageController.java src/main/java/com/mmall/controller/portal/ProductController.java src/main/java/com/mmall/service/IFileService.java src/main/java/com/mmall/service/IProductService.java src/main/java/com/mmall/service/impl/FileServiceImpl.java src/main/java/com/mmall/service/impl/ProductServiceImpl.java src/main/java/com/mmall/util/DateTimeUtil.java src/main/java/com/mmall/util/FTPUtil.java src/main/java/com/mmall/vo/ no changes added to commit (use "git add" and/or "git commit -a") Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git add . warning: CRLF will be replaced by LF in src/main/java/com/mmall/common/Const.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/ProductMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/util/PropertiesUtil.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/ProductMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/webapp/index.jsp. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/controller/backend/ProductManageController.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/controller/portal/ProductController.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/IFileService.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/IProductService.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/impl/FileServiceImpl.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/impl/ProductServiceImpl.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/util/DateTimeUtil.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/util/FTPUtil.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/vo/ProductDetailVo.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/vo/ProductListVo.java. The file will have its original line endings in your working directory. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: src/main/java/com/mmall/common/Const.java new file: src/main/java/com/mmall/controller/backend/ProductManageController.java new file: src/main/java/com/mmall/controller/portal/ProductController.java modified: src/main/java/com/mmall/dao/ProductMapper.java new file: src/main/java/com/mmall/service/IFileService.java new file: src/main/java/com/mmall/service/IProductService.java new file: src/main/java/com/mmall/service/impl/FileServiceImpl.java new file: src/main/java/com/mmall/service/impl/ProductServiceImpl.java new file: src/main/java/com/mmall/util/DateTimeUtil.java new file: src/main/java/com/mmall/util/FTPUtil.java modified: src/main/java/com/mmall/util/PropertiesUtil.java new file: src/main/java/com/mmall/vo/ProductDetailVo.java new file: src/main/java/com/mmall/vo/ProductListVo.java modified: src/main/resources/mappers/ProductMapper.xml modified: src/main/webapp/index.jsp Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git commit -am '商品模块' [v1.0 0c8dab1] 商品模块 15 files changed, 1055 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/mmall/controller/backend/ProductManageController.java create mode 100644 src/main/java/com/mmall/controller/portal/ProductController.java create mode 100644 src/main/java/com/mmall/service/IFileService.java create mode 100644 src/main/java/com/mmall/service/IProductService.java create mode 100644 src/main/java/com/mmall/service/impl/FileServiceImpl.java create mode 100644 src/main/java/com/mmall/service/impl/ProductServiceImpl.java create mode 100644 src/main/java/com/mmall/util/DateTimeUtil.java create mode 100644 src/main/java/com/mmall/util/FTPUtil.java create mode 100644 src/main/java/com/mmall/vo/ProductDetailVo.java create mode 100644 src/main/java/com/mmall/vo/ProductListVo.java Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git push Counting objects: 34, done. Delta compression using up to 4 threads. Compressing objects: 100% (31/31), done. Writing objects: 100% (34/34), 10.86 KiB | 0 bytes/s, done. Total 34 (delta 11), reused 0 (delta 0) To gitee.com:shushengshi/mmall_learning.git 6d19e5a..0c8dab1 v1.0 -> v1.0 收货地址模块完成 Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: src/main/java/com/mmall/dao/ShippingMapper.java modified: src/main/resources/mappers/ShippingMapper.xml Untracked files: (use "git add <file>..." to include in what will be committed) src/main/java/com/mmall/controller/portal/ShippingController.java src/main/java/com/mmall/service/IShippingService.java src/main/java/com/mmall/service/impl/ShippingServiceImpl.java no changes added to commit (use "git add" and/or "git commit -a") Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git add . warning: CRLF will be replaced by LF in src/main/java/com/mmall/dao/ShippingMapper.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/resources/mappers/ShippingMapper.xml. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/controller/portal/ShippingController.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/IShippingService.java. The file will have its original line endings in your working directory. warning: CRLF will be replaced by LF in src/main/java/com/mmall/service/impl/ShippingServiceImpl.java. The file will have its original line endings in your working directory. Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git status On branch v1.0 Your branch is up-to-date with 'origin/v1.0'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: src/main/java/com/mmall/controller/portal/ShippingController.java modified: src/main/java/com/mmall/dao/ShippingMapper.java new file: src/main/java/com/mmall/service/IShippingService.java new file: src/main/java/com/mmall/service/impl/ShippingServiceImpl.java modified: src/main/resources/mappers/ShippingMapper.xml Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git commit -am '收货地址模块' [v1.0 eb1bb33] 收货地址模块 5 files changed, 295 insertions(+), 25 deletions(-) create mode 100644 src/main/java/com/mmall/controller/portal/ShippingController.java create mode 100644 src/main/java/com/mmall/service/IShippingService.java create mode 100644 src/main/java/com/mmall/service/impl/ShippingServiceImpl.java Shusheng Shi@PC-of-sss MINGW64 /h/mmall (v1.0) $ git push Counting objects: 19, done. Delta compression using up to 4 threads. Compressing objects: 100% (16/16), done. Writing objects: 100% (19/19), 3.45 KiB | 0 bytes/s, done. Total 19 (delta 9), reused 0 (delta 0) To gitee.com:shushengshi/mmall_learning.git 8c735cb..eb1bb33 v1.0 -> v1.0

优秀的个人博客,低调大师

利用java反射机制,使用android系统的内部类成员函数

//访问某个属性 Context mmsCtx = createPackageContext( "com.android.lockscreen" , Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY); Class<?> maClass = Class.forName( "com.android.lockscreen.LockScreenActivity" , true , mmsCtx.getClassLoader()); Object maObject = maClass.newInstance(); Field f_mPm = maClass.getDeclaredField( "TAG" ); f_mPm.setAccessible( true ); Log.i(LOG_TAG, "___________________________________________obj:" +f_mPm.get(maObject)); //访问方法 //访问 try { Context mmsCtx = createPackageContext( "com.android.lockscreen" , Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY); Class<?> maClass = Class.forName( "com.android.lockscreen.LockScreenActivity" , true , mmsCtx.getClassLoader()); Object maObject = maClass.newInstance(); Field f_mPm = maClass.getDeclaredField( "TAG" ); //maClass.getDeclaredMethod("", parameterTypes); f_mPm.setAccessible( true ); Log.i(LOG_TAG, "___________________________________________obj:" +f_mPm.get(maObject)); Class[] resource = new Class[]{Context. class }; Object[] resourceObj = new Object[]{mmsCtx}; Method addsMethod = maClass.getDeclaredMethod( "getLockScreenView" , resource); addsMethod.setAccessible( true ); View addsResult = (View)addsMethod.invoke(maObject, resourceObj); Log.i(LOG_TAG, "___________________________________________addsResult:" +addsResult); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } //定义被访问 public class LockScreenActivity extends Activity { private String TAG = "LockScreenActivity" ; //private LockScreen mScreen = new LockScreen(LockScreenActivity.this); private LockScreen getLockScreenView(Context context){ Log.i(TAG, "_________________________________________context:" +context); return new LockScreen(context); } } //获取setting包的的Context Context mmsCtx = createPackageContext( "com.android.settings" , Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY); //使用setting的classloader加载com.android.settings.ManageApplications类 Class<?> maClass = Class.forName( "com.android.settings.ManageApplications" , true , mmsCtx.getClassLoader()); //创建它的一个对象 Object maObject = maClass.newInstance(); /* * 将私有域mPm赋值。因为mPm在SizeObserver的invokeGetSize中用到了, * 却因为没有执行onCreate而没有初始化,所以要在此处初始化。 */ Field f_mPm = maClass.getDeclaredField( "mPm" ); f_mPm.setAccessible( true ); f_mPm.set(maObject, mmsCtx.getPackageManager()); 分类: android solve 本文转自wanqi博客园博客,原文链接http://www.cnblogs.com/wanqieddy/archive/2011/10/25/2224200.html :如需转载请自行联系原作者

资源下载

更多资源
Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册