java - 在服务器上运行 spring boot 应用程序

标签 java spring spring-boot tomcat

我是 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/

相关文章:

java - getForEntity 返回 null

java - 当您在休息调用中公开接口(interface)RequestBody时,如何将json反序列化为java对象?

java - 这个Java猜谜游戏程序中嵌套的do-while循环的作用是什么?

java - JNI-java.lang.UnsatisfiedLinkError但函数签名正确

java - spring data redis 文档示例不起作用

java - Spring Boot WAR 部署

java - 在不使用 if 条件的情况下计算二叉树中的叶子

java - 我如何在 Telegram 中共享音频

java - spring cloud配置客户端配置刷新不起作用

java - 了解 Spring Boot @Autowired