记录springboot及项目中的一些集成(1)springboot

基本配置:
这里选用的springboot 版本是:

<version>2.2.4.RELEASE</version>

springboot热部署,健康检查,lombok

<!-- lombok -->
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <optional>true</optional>
</dependency>
<!--热部署-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>
<!--健康检查-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

一定要记得配置这一段
<plugin>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-maven-plugin</artifactId>
	<configuration>
 	   <mainClass>com.example.demo.DemoApplication</mainClass>
       <fork>true</fork>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>repackage</goal>
            </goals>
        </execution>
    </executions>
</plugin>

properties 文件的配置/同样适用于YML文件

#热部署
#热部署生效
spring.devtools.restart.enabled=true
#设置重启的目录
spring.devtools.restart.additional-paths=src/main/java
#classpath目录下的WEB-INF文件夹内容修改不重启
spring.devtools.restart.exclude=WEB-INF/**

#默认只有info/health
#http://localhost:8080/actuator/health
management.endpoints.web.base-path = /
management.endpoint.shutdown.enabled=true
#management.endpoints.web.exposure.exclude=beans,env
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details = always
info.app-name=spring-boot-actuator-demo
info.description=集成配置

到此就算配置未完成;源码在更新完基本集成基础使用后更新出来!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值