idea配置
spring boot 热部署导入devtool依赖idea窗口钝化
yml yet anothor markup language
actuator是spring boot 提供的对应系统的自省和监控的基础功能,当出现问题时可以及时的定位问题。
每一个工程都可以使用。
#Actuator 监控端口号
management.server.port=9999
management.server.servlet.context-path=/kkk
localhost:9999/kkk/actuator/health查询状态
在配置文件中添加info信息 info.projext.groupId=@project.groupId@
{"company":{"name":"rookie.li","url":"China"},"project":{"groupid":"com.kaikeba","artifactId":"01-primary","version":"0.0.1-SNAPSHOT"}}
application.properties配置
#当前应用系统的端口号与上下文路径
server.port=8888
server.servlet.context-path=/kkb
#Actuator 监控端口号
management.server.port=9999
management.server.servlet.context-path=/kkk
#指定监控终端的基本路径默认为/actuator
management.endpoints.web.base-path=/base
#开放所有监控终端
management.endpoints.web.exposure.include=*
#关闭某些
management.endpoints.web.exposure.exclude=env
#自定义info信息
info.company.name=rookie.li
info.company.url=China
#从pom.xml读取信息
info.project.groupid=@project.groupId@
info.project.artifactId=@project.artifactId@
info.project.version=@project.version@
mappings显示隐射关系
env环境
info信息
health应用程序健康指标
shutdown关闭应用程序需要enpoints.shutdown.enabled设置为true
metrics报告各种应用程序度量信息比如内存
跳转页面404文件名public、error
文件名404.html
多环境选择
只需要在springboot的配置文件中指定即可
applocation-pro.properties配置
server.port=9999
server.servlet.context-path=/pro
application-dev.properties配置
#开发环境
server.port=8888
server.servlet.context-path=/dev
application.properties配置
spring.profiles.active=pro
打出jar包后选择环境只需要 java -jar xxx.jar --sping.profiles.active=dev即可
@profiles可以支持到方法级别