您的位置:首页 > 编程语言 > Java开发

IDEA下如何多次运行同一个springboot项目

2018-01-11 16:08 801 查看
1、设置Configurations





2、修改application.java启动文件

@SpringBootApplication
@EnableEurekaClient
public class EurekaService1Application {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String port = scanner.nextLine();
new SpringApplicationBuilder(EurekaService1Application.class)
.properties("server.port=" + port).run(args);
}
// public static void main(String[] args) {
// SpringApplication.run(EurekaService1Application.class, args);
// }
}3、运行项目





再次启动项目



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息