简体   繁体   English

通过IntelliJ运行配置运行Spring引导

[英]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 问候

  1. 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运行配置中显式定义它。

  2. 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.

相关问题 Intellij Spring Boot运行配置 - Intellij Spring Boot Run Configuration Spring 引导应用程序的 IntelliJ 运行配置? - IntelliJ Run Configuration for Spring Boot apps? 有没有办法在 IntelliJ IDEA 中使用单个运行配置运行多个 Spring Boot 应用程序? - Is there a way to run multiple Spring Boot applications with a single Running Configuration in IntelliJ IDEA? Intellij运行配置Spring Boot与Maven问题 - Intellij Run Configuration Spring Boot vs Maven Issues intellij运行配置找不到spring boot类 - intellij run configuration can't find spring boot class 使用Spring Boot和多个模块的Maven配置 - 在Intellij中运行应用程序 - Maven configuration with Spring Boot & multi modules - run application in Intellij Spring Boot+Java 9 Modules+Intellij Communicaty Edn:运行配置的行为不同于 jar 和 mvn spring-boot:运行 - Spring Boot+Java 9 Modules+Intellij Communicaty Edn: Run configuration behaves differently to jar and mvn spring-boot:run 从IntelliJ的sprint引导运行配置运行整个JHipster生成的Web应用程序 - Running entire JHipster generated web application from IntelliJ's sprint boot run configuration 如何知道Spring Boot应用程序是通过mvn spring-boot:run或Java执行运行的 - How to know spring boot app is running via mvn spring-boot:run or java execution Intellij使用Gradle运行Spring Boot时忽略的断点 - Breakpoints ignored by Intellij running Spring Boot with Gradle
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM