文变染乎世情,兴废系乎时序。——刘勰 按照springboot官方文档 首先我们添加依赖 1 2 3 4 5 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> 并在maven-plugin中排除依赖,因为我们maven进行编译、打包等并不需要它 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <project> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <excludes> <exclude>...