摘要: docker run -d -p 8090:8080 -v /[宿主机文件绝对路径]:/[容器路径] --name [新名字] [容器名字] 例子 docker run -d -p 8090:8080 -v /usr/webapps/app1:/usr/local/tomcat/webapps -- 阅读全文
posted @ 2018-06-21 15:09 白白胖胖萌 阅读(6207) 评论(1) 推荐(0) 编辑
摘要: 1.查询镜像[root@localhost ~]# docker search tomcat 2.拉取镜像[root@localhost ~]# docker pull tomcat3.创建tomcat容器docker run -d --name mytomcat -p 8888:8080 [镜像名 阅读全文
posted @ 2018-06-21 10:29 白白胖胖萌 阅读(690) 评论(0) 推荐(0) 编辑
摘要: 继承WebMvcConfigurerAdapter类,重写类中的方法,可以增加额外的配置 @Configuration public class WebMvcConfig extends WebMvcConfigurerAdapter{ /** * 配置静态访问资源 * @param registry */ @Override public... 阅读全文
posted @ 2018-03-26 14:04 白白胖胖萌 阅读(175) 评论(0) 推荐(0) 编辑
摘要: /** * 对字符串md5加密(小写+数字) * * @param str 传入要加密的字符串 * @return MD5加密后的字符串 */ public static String getMD5(String str) { try { // 生成一个MD5加密计算摘要 ... 阅读全文
posted @ 2018-03-26 09:38 白白胖胖萌 阅读(144) 评论(0) 推荐(0) 编辑
摘要: security的依赖 配置一下application.properties 创建一个SysUser(用户类),实现UserDetails类,重写里面的方法。 注意属性名字只能是username和password. 然后写一个service和数据层 写一个WebSecurityConfig 三个页面 阅读全文
posted @ 2018-03-23 17:13 白白胖胖萌 阅读(565) 评论(1) 推荐(0) 编辑
摘要: 跳转页面需要加上模版依赖:<!--thymeleaf--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId></dependen 阅读全文
posted @ 2018-03-21 18:01 白白胖胖萌 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 记录一下今天搭建spring boot项目的过程 File New Project Spring Initializr -- next 这里可以全部默认,或者自己更改下名字 这里可以勾选web,然后根据自己需要勾选,我这里选了JPA,MySql,MyBatis。 next Finish-- 这样sp 阅读全文
posted @ 2018-03-20 17:58 白白胖胖萌 阅读(668) 评论(0) 推荐(0) 编辑