[英]Problems accessing REST endpoints from Springboot application deployed on Tomcat
[英]Running both Springboot and Rest endpoints in one project/application Java
我對是否可以在一個應用程序中運行spring boot東西和REST端點感到非常困惑。 目前,我將它們放在單獨的項目目錄中,使用以下命令運行springboot UI:
@SpringBootApplication
public class LeagueProjectUiApplication {
public static void main(String[] args) {
SpringApplication.run(LeagueProjectUiApplication.class, args);
}
}
REST其余端點具有:
mvn tomcat7:run
我的球衣和tomcat東西在pom.xml中聲明
休息:
@Path("/university")
public class University {
@GET
@Path("/{universitycode}")
@Produces(MediaType.APPLICATION_JSON)
public Response returnSingleSummoner(
@PathParam("universitycode") String universityCode) {
}
同時運行SpringBoot和REST端點的最佳方法是什么,否則我會完全困惑!
謝謝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.