1.如何监视所有spring boot微服务
安装actuator插件,然后通过接口查询 /actuator/health
2.spring boot项目性能如何优化
a.优化启动时间,去除重复的依赖
b.JVM优化(java虚拟机优化),限制堆的最小最大值
c.数据库查询优化,要避免查询表的所有
d.并发优化,对于执行时间较长的逻辑,改为异步处理
3.spring boot项目如何实现热部署
a.安装spring-boot-devtools
b.在properties添加配置,实现自动重启
spring.devtools.restart.enabled=true
spring.devtools.livereload.enabled=true
4.spring boot微服务中如何实现session共享
用redis
5.你使用了哪些starter maven依赖
security,,jdbc,actuator
6.spring boot项目中的starter是什么
一组预置依赖包,为了简化配置,提高开发效率
7.spring boot如何实现定时任务
通过设置@Scheduled注解配置定时服务
定时服务有哪些
fixedRate=5000 每五秒执行一次
cron = "0 30 8 * * ?" 每天8点30执行
fixedDelay=5000 任务执行完成五秒后再次执行
8.spring-boot-starter-parent的作用
a.提供默认的配置,依赖以及插件管理,减少版本冲突
9.spring boot项目如何打包
用maven的install
10.spring boot打的jar包与普通的jar包有什么区别
spring boot打的包
a.有启动类
b.有内嵌的启动容器,比如tomcat
c.有内置的依赖库
d.有资源文件,比如html,css图片等