remark : main 에서 tomcat 포트 연결하기
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import org.apache.catalina.LifecycleException; import org.apache.catalina.startup.Tomcat; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import java.io.IOException; @SpringBootApplication public class DemoApplication { public static void main(String[] args) throws IOException, LifecycleException { SpringApplication.run(DemoApplication.class, args); System.out.println("test"); Tomcat tomcat = new Tomcat(); tomcat.setPort(8087); tomcat.getConnector(); tomcat.start(); //tomcat.getServer().await(); } } |