I am using spring-boot with maven, this is my configuration class:
package hello;
import javax.servlet.MultipartConfigElement;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
When the app starts show this line in console:
2014-11-06 17:00:55.102 INFO 4669 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080/http
I want to change the TomcatEmbedded port to 8081 for the case. Thanks :D
mvn exec:java -Dserver.port=8081
– Ben Lin Dec 04 '17 at 10:25