我在我的Spring Boot应用程序中使用嵌入式tomcat。我调整应用程序的目标如下:
clean spring-boot:run
它运行没有错误。我使用eclipse shutdown按钮将其关闭。第二次我尝试运行它,我得到这个:
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project cpanel: Failed to clean project: Failed to delete XXXXXXXXX\target\classes\hibernate\security\user\User.hbm.xml -> [Help 1]
sims tomcat下次无法删除目标。我的雄猫怎么了?难道我做错了什么?
我在application.yml中的服务器配置:
server:
compression:
enabled: true
port: 8080
servlet-path: /rest
和我的tomcat依赖关系:
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
要解决此问题,请更改tomcat maven plugin
并添加fork
到false
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>false</fork>
</configuration>
</plugin>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句