我是 Spring 应用程序开发的新手。
如何在 tomcat 服务器上开发阶段运行我的应用程序。
here我可以看到最终部署的解决方案。每次我需要停止并重新开始时,我只需要在 ui 上更改一些。它杀了我。那么你能帮帮我吗??
我的 pom.xml 依赖项是
org.spring框架 Spring 绑定(bind) 1.0.6
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
最佳答案
将 devtools 依赖项添加到您的项目。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
每当类路径中的文件更改时,使用 spring-boot-devtools 的应用程序将导致应用程序重新启动。此功能的好处是大大减少了验证所做更改所需的时间。
关于java - 在服务器上运行 spring boot 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55181511/