正确、安全地停止SpringBoot应用服务 https://www.jianshu.com/p/44ef43b282f0
一起来学 SpringBoot 2.x 目录 http://www.iocoder.cn/categories/Spring-Boot/
1 |
$("#locker").hide();$("#post-body").css({"ovver":"auto"});$("#post-body").parent().css({"height":"8000px","overflow": "auto"}); |
springboot学习资料汇总 http://www.ityouknow.com/springboot/2015/12/30/springboot-collect.html
Spring Boot教程 https://so.csdn.net/so/search/s.do?q=Spring%20Boot%E6%95%99%E7%A8%8B&t=blog&u=gnail_oug
swagger2常用注解说明 https://blog.csdn.net/u014231523/article/details/76522486
社区Spring Boot 从入门到进阶系列教程 http://www.spring4all.com/article/246
Intellij Idea Spring Boot 热部署 https://www.jianshu.com/p/330052ebf52d 必须在调试模式下,手动或者快捷键编译代码
application.propertierde 的完整的属性列表 https://www.jianshu.com/p/9d390fe034f2
springBoot 获取配置的方式(5种) https://blog.csdn.net/echoes_yu/article/details/79833621
SpringBoot2.0 优雅停机 https://www.jianshu.com/p/8faf7c3c78ac
Spring Boot与RabbitMQ的整合消息确认 https://blog.csdn.net/yangliuhbhd/article/details/79936085 https://blog.csdn.net/linpeng_1/article/details/80505828 (这里有几项配置设置才有效)
关于Spring Boot 许多优秀例子 http://blog.csdn.net/column/details/13987.html
SpringBoot Redis 缓存
https://blog.csdn.net/fanpeizhong/article/details/79998164 配置文件注释掉才成功
http://blog.51cto.com/13501268/2312854
Spring Boot Admin 监控服务配置 https://segmentfault.com/a/1190000014806559
SpringBoot Admin 使用指南 http://www.54tianzhisheng.cn/2018/01/17/SpringBoot-Admin/
Spring-boot-admin配置属性详解 https://blog.csdn.net/feidie436/article/details/81381841
@Configuration注解、@Bean注解以及配置自动扫描、bean作用域 https://blog.csdn.net/javaloveiphone/article/details/52182899
swagger-spring-boot-starter API工具包官方 https://github.com/battcn/swagger-spring-boot
Spring Boot系列(九) 使用Druid连接池 https://blog.csdn.net/xtiawxf/article/details/52423691
Spring Boot 注册 Servlet 的三种方法,真是太有用了 https://juejin.im/post/5dd4fd76e51d4536cc673f7a
Mybatis-Plus整合
官方文档 https://mybatis.plus/guide/
Spring Boot 集成 Mybatis 两种方式 https://www.jianshu.com/p/533a3a3a78de
springboot+mybatis+mybaits plus 整合与基本应用 https://juejin.im/post/5c04c3d451882508851b7bdd
SpringBoot整合Mybatis-Plus https://juejin.im/post/5b517d24e51d451907696dec
Mybatis-plus的集成和使用 https://my.oschina.net/xiedeshou/blog/1860412
spring boot整合mybatis+mybatis-plus https://www.cnblogs.com/pangguoming/p/7985644.html
spring boot配置mybatis和事务管理 https://blog.csdn.net/wohaqiyi/article/details/72895983
mybatis plus强大的条件构造器queryWrapper、updateWrapper https://blog.csdn.net/m0_37034294/article/details/82917234
入口类需要放在包的最外层在,能够扫描到所有子包中的类
注解整理:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
@SpringBootApplication : @RestController : @Autowired : @GetMapping("/demo1") : @PostMapping("/demo1") : @Component : @PropertySource("classpath:my2.properties") : @ConfigurationProperties(prefix = "my2") : @EnableAdminServer : @Service( version = "${demo.service.version}", application = "${dubbo.application.id}", protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}" ) |
Spring Boot集成druid连接池 https://blog.csdn.net/gnail_oug/article/details/80172239 官方: https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter
执行方式:
1. main方法类,直接运行
2. jar方式
pom.xml设定启动信息
1 2 3 4 5 6 7 8 9 10 11 |
<plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <mainClass>com.example.sb.ProvideApplication</mainClass> <layout>ZIP</layout> </configuration> </plugin> </plugins> |
mvn package ; jar tvf target/SpringBootTest-1.0-SNAPSHOT.jar, 注意,如果是web环境,可能无法退出
1. web程序,要使用: mvn spring-boot:run 执行,才能找到jsp等文件
热加载和调式方案
自动重启:不是必须的
http://www.cnblogs.com/winner-0715/p/6666579.html
CTRL + SHIFT + A –> 查找make project automatically –> 选中
原理是改变class的时候重启,不过可以不选择,手动编辑java后也会重启,就是不操作:CTRL + SHIFT + A –> 查找Registry –> 找到并勾选compiler.automake.allow.when.app.running
调式办法: idea下的spring boot remote debug 启动办法
http://blog.csdn.net/u010136084/article/details/62044423 http://www.voidcn.com/blog/liufang1991/article/p-6154094.html
配置:
方式A: 在maven启动的时候加参数
1 2 |
//启动: 如果端口被占用,可能无法启动 spring-boot:run "-Drun.jvmArguments=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" |
方式B: 在pom.xml增加配置:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <jvmArguments>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</jvmArguments> <executable>true</executable> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> |
定义Remote
1 2 3 4 |
//默认 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 |
Spring Boot集成MyBatis开发Web项目 http://blog.csdn.net/jrainbow/article/details/51980036
SpringBoot和Mybatis整合 http://www.jianshu.com/p/5ef281100bb6
spring boot 1.4 整合 mybatis druid http://www.jianshu.com/p/cef49ad91ba9
Spring Boot中使用@Scheduled创建定时任务 http://blog.didispace.com/springbootscheduled/
Spring Boot基础教程——web应用开发-模板引擎 https://my.oschina.net/Howard2016/blog/908541
问题:
No active profile set, falling back to default profiles: default 处理参考: https://www.cnblogs.com/lykbk/p/sewrfefes3453454354.html
同时加入:
1 2 3 4 |
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> |