摘要: 在本文中,你将获取到有关于Spring,Spring MVC和Spring Boot的概述,了解他们解决的问题以及最佳的应用位置。最重要的是Spring,Spring MVC和Spring Boot不会矛盾。他们很好的解决了不同的问题。 1.Spring框架解决的核心问题是什么? 好好想想,Spri 阅读全文
posted @ 2019-06-27 10:42 小丽的小明 阅读(185) 评论(0) 推荐(0) 编辑
摘要: springboot默认使用Logback来记录日志,且默认是只打印到控制台中,不会输出到文件。需要输出到文件中,只需要在配置文件application.properties中加上一句:loggin.file = xxx 即可。可以使用相对路径或者绝对路径。 logging.file=../logs 阅读全文
posted @ 2019-06-25 11:24 小丽的小明 阅读(402) 评论(0) 推荐(0) 编辑
摘要: springboot整合redis相关依赖引入 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> 阅读全文
posted @ 2019-06-06 15:35 小丽的小明 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1、使用starter, maven仓库地址:http://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter 2、加入依赖(可以用 http://start.spring.io/ 下载) <! 阅读全文
posted @ 2019-05-29 11:08 小丽的小明 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Springboot整合freemarker1、Freemarker相关maven依赖 <!-- 引入freemarker模板引擎的依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-b 阅读全文
posted @ 2019-05-22 17:41 小丽的小明 阅读(377) 评论(0) 推荐(0) 编辑
摘要: SpringBoot2.x过滤器Filter和使用Servlet3.0配置自定义Filter1、SpringBoot启动默认加载的Filter characterEncodingFilter hiddenHttpMethodFilter httpPutFormContentFilter reques 阅读全文
posted @ 2019-05-22 11:35 小丽的小明 阅读(150) 评论(0) 推荐(0) 编辑
摘要: springboot @SpringBootTest单元测试 1、引入相关依赖 <!--springboot程序测试依赖,如果是自动创建项目默认添加--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spr 阅读全文
posted @ 2019-05-20 14:18 小丽的小明 阅读(1810) 评论(0) 推荐(0) 编辑
摘要: SpringBoot2.x使用Dev-tool热部署 简介:介绍什么是热部署,使用springboot结合dev-tool工具,快速加载启动应用 官方地址:https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/h 阅读全文
posted @ 2019-05-20 09:45 小丽的小明 阅读(683) 评论(0) 推荐(0) 编辑
摘要: MultipartFile 对象的transferTo方法,用于文件保存(效率和操作比原先用FileOutStream方便和高效) 打包成jar包,需要增加maven依赖 <build> <plugins> <plugin> <groupId>org.springframework.boot</gr 阅读全文
posted @ 2019-05-17 09:45 小丽的小明 阅读(2641) 评论(0) 推荐(0) 编辑
摘要: Jackson常用注解: 指定字段不返回:@JsonIgnore 指定日期格式:@JsonFormat(pattern="yyyy-MM-dd hh:mm:ss",locale="zh",timezone="GMT+8") 空字段不返回:@JsonInclude(Include.NON_NUll) 阅读全文
posted @ 2019-05-16 15:41 小丽的小明 阅读(865) 评论(0) 推荐(0) 编辑