springboot的热部署带来的异常

<dependency>
     <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>

</dependency> 

yml:

server:
  port: 8001

按照上面的配置启动项目,启动后的端口号是8080,而不是8001,而且项目的controller也不能访问

改正:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>

</dependency>

yml:

server:
  port: 8001

下面这个启动就正常了

猜你喜欢

转载自blog.csdn.net/wojiao228925661/article/details/80901565