我已經使用Building a RESTful Web Service教程爲我的目的構建WebService。這很容易,但現在我很難配置WebService應該綁定的端口。沒有3210或任何在這個項目中配置的東西。任何人都可以給我一個關於如何配置WebService的端口的提示嗎?Spring REST風格Web服務的端口綁定
由於這些細節可能會有幫助。我使用下面的代碼啓動服務器,其中包含@EnableAutoConfiguration
標記。配置由Spring Boot完成。
@ComponentScan
@EnableAutoConfiguration
public class ServerStarter{
public static void main(String[] args) {
SpringApplication.run(ServerStarter.class, args);
}
}
該鏈接提供了一些進一步的細節,如添加一個'application.properties'。多謝! – Baschi
有沒有不同的方式來做到這一點? – hipokito