[英]Running Spring boot via IntelliJ run configuration
I have a small Spring boot application version 1.3.3 in IntelliJ 2016.1.2 Whenever I run the application via the command-line with mvn package && java -jar target/build.jar I can access the webapp without any problems. 我在IntelliJ 2016.1.2中有一个小的Spring启动应用程序版本1.3.3每当我通过命令行使用mvn package && java -jar target / build.jar运行应用程序时,我可以毫无问题地访问webapp。 However, when I use a Spring Boot run configuration, the applications is started successfully, but when I go to the webapp, I always get the message 'GET' is not supported.
但是,当我使用Spring Boot运行配置时,应用程序启动成功,但是当我转到webapp时,我总是得到消息'GET'不受支持。
I recall that I searched for this problem some time ago and it was a known bug in the IDE that also appeared in Eclipse. 我记得我前一段时间搜索过这个问题,它是IDE中一个已知的错误,也出现在Eclipse中。 But I cannot find those posts anymore and therefore cannot access the solution.
但我再也找不到这些帖子,因此无法访问解决方案。
Can any of you guys help please? 你们中的任何人可以帮忙吗?
Thanks in advance. 提前致谢。 Regards
问候
Check if application.properties (yml) file inside "Working directory" of IDE run configuration. 检查IDE的“工作目录”中的application.properties(yml)文件是否运行配置。 Or define it explicitly in IDE run configuration with spring.config.location property.
或者使用spring.config.location属性在IDE运行配置中显式定义它。
Check app startup logs whether declared request mappings appears, like so 检查应用程序启动日志是否显示声明的请求映射,如此
2016-06-03 11:50:02,204 INFO [main] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] Mapped "{[/webapp/1.0/endpoint],methods=[GET]}" onto ...
2016-06-03 11:50:02,204 INFO [main] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]将“{[/webapp/1.0/endpoint],methods=[GET]}”映射到...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.