Auth认证中心配置文件都不生效

debug

起初我以为是因为bootstrap的配置文件没有加载,百度搜索要在pom中添加

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>

但实际上,我的pom中是有这个依赖的,在经历了无数次的mvn clean和build之后

我将application的配置文件再次添加回来了,但是在启动的时候,发现竟然连application都失效了

检查targe后发现,果然,配置文件没一个build进去的

image-20230403110018093

只有一个jwt的证书进去了,因为我在pom中配置了

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/*.jks</include>
</includes>
</resource>
</resources>
</build>

所以直接修改

<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>

这次将resource的所有文件都打包进去了