springBoot的热部署, 捕获项目的全局异常,逆向工程,定时任务,使用Druid和监控配置,过滤器、监听器,拦截器以及模板(thymeleaf-freemarker)
springBoot的热部署 转载:
http://412887952-qq-com.iteye.com/blog/2291518
springBoot 捕获项目的全局异常:
在class注解上@ControllerAdvice,
在方法上注解上@ExceptionHandler(value = Exception.class)
转载: http://412887952-qq-com.iteye.com/blog/2291524
jpa的逆向工程 有没有(确认 实践一下):
转载: http://412887952-qq-com.iteye.com/blog/2291542
Spring Boot修改端口号:
Spring boot 默认端口是8080,如果想要进行更改的话,只需要修改applicatoin.properties文件,在配置文件中加入:
server.port=9090
Spring Boot配置ContextPath:
server.context-path=/spring-boot
Spring Boot改变JDK编译版本:
转载: http://412887952-qq-com.iteye.com/blog/2291587
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
Spring Boot定时任务的使用:
类声明上 增加@EnableScheduling和@Configuration 注释即可:
@Scheduled(cron = "0/20 * * * * ?") // 每20秒执行一次
Spring Boot使用Druid和监控配置(很少用到 监控):
转载: http://412887952-qq-com.iteye.com/blog/2292362
Spring Boot使用模板(thymeleaf-freemarker)默认是thymeleaf 模板:
转载: http://412887952-qq-com.iteye.com/blog/2292402
Spring Boot过滤器、监听器,使用的注解为:@WebFilter和@WebListener:
转载: http://412887952-qq-com.iteye.com/blog/2292475
Spring Boot 拦截器HandlerInterceptor 的使用:
转载: http://412887952-qq-com.iteye.com/blog/2292476
浙公网安备 33010602011771号