由于不想使用新模版,增加学习成本,故此延用jsp; 1、pom 文件 2、配置文件 注意了,手动添加: 否则,报404,搞了一天,不是原来的地方了,原来的是: ...
分类:
编程语言 时间:
2018-01-07 17:37:03
阅读次数:
195
spring boot 默认使用日志打印到console 添加application.properties文件在src/main/resoures文件夹下 logging.file=my.log 将日志写在文件中 详细使用方法: 参考 application properties 官方配置文件示例 ...
分类:
编程语言 时间:
2018-01-07 16:05:31
阅读次数:
137
大家都知道springboot项目都是微服务部署,A服务和B服务分开部署,那么它们如何更新或者获取共有模块的缓存数据,或者给A服务做分布式集群负载,如何确保A服务的所有集群都能同步公共模块的缓存数据,这些都涉及到分布式系统缓存的实现。 前面其实我已经介绍了springboot+mybatis+ehc ...
分类:
编程语言 时间:
2018-01-07 14:28:19
阅读次数:
2679
1. 添加依赖 2. 启动swagger ui注解 3.添加 controller注解 4. swagger ui 链接: localhost:8080//swagger-ui.html (默认) 参考这里 ...
分类:
编程语言 时间:
2018-01-07 14:04:15
阅读次数:
179
创建 三个类 分别实现 Filter ServletContextListener HttpServlet 在springboot 启动类中@bean加入 2 ,实现 ServletContextIntializer接口 3. 注解方式 主类加上@ServletComponentScan 给三个分别 ...
分类:
编程语言 时间:
2018-01-06 23:20:01
阅读次数:
223
参考 http://www.conglin-site.com/document/html/1494763157.html 1. pom <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artif ...
分类:
编程语言 时间:
2018-01-06 15:53:38
阅读次数:
252
Druid Spring Boot Starter mybatis-spring-boot-autoconfigure 新建spring boot工程,添加pom依赖 <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactI ...
分类:
编程语言 时间:
2018-01-06 14:33:00
阅读次数:
334
参考 http://www.conglin site.com/document/html/1494763157.html 1. pom 2. 与springboot集成 3. 下载swagger ui dist 目录 index.html url: "http://petstore.swagger. ...
分类:
编程语言 时间:
2018-01-06 11:58:53
阅读次数:
160
Spring Boot项目工程 src/main/java:主程序入口HelloApplication,可以通过直接运行该类来启动Spring Boot应用。 src/main/resources:配置目录,该目录用来存放应用的一些配置,比如应用名,服务端口,数据库链接等。 由于引入了web模块,由 ...
分类:
编程语言 时间:
2018-01-05 15:40:46
阅读次数:
424
刚开始学习Springboot,然后使用http://start.spring.io/生成了一个实例,但是在使用@RestController注解的时候提示”RestController cannot be resolved to a type”, 原因是pom.xml中添加支持web的模块: ...
分类:
编程语言 时间:
2018-01-05 15:38:50
阅读次数:
894