springboot 打成jar包:一个jar包需要运行多个实例

注意在springboot 打成jar包,需要运行多个实例,通过修改端口才能实现:

1.server.port=8091;java -jar tianjin-guotou-fix-1.0-SNAPSHOT.jar com.bonc.tianjin.guotou.Handler.HaHa

2.server.port=8092;java -jar tianjin-guotou-fix-1.0-SNAPSHOT.jar com.bonc.tianjin.guotou.Handler.DailyElectricDataHandler

打包pom:


    
      
        org.springframework.boot
        spring-boot-maven-plugin
        
        
          com.bonc.tianjin.guotou.Application
        
        
          
            
              repackage
            
          
        
      
    

  

 

 

springboot 打成jar包:一个jar包需要运行多个实例_第1张图片

你可能感兴趣的:(springboot)