在spring启动Maven插件生成一个JVM将在默认情况下,包括任何你的项目应该说是在classpath如
${project.build.outputDirectory}这包括课程和资源- 项目的POM中声明的依赖项
如果您需要向此类路径添加内容,则插件提供以下内容:
- addResources
- 资料夹
- useTestClasspath
例如,如果要将此文件夹:添加
/this/that/theother到类路径,则可以按以下方式配置spring-boot插件:
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <folders> <folder> /this/that/theother </folder> </folders> </configuration></plugin>
有了该配置,如果调用它,
mvn spring-boot:run -X您将看到在类路径的前面包含了附加文件夹…
[DEBUG]分叉进程的类路径:/ this / that / theother:…



