gpt4 book ai didi

java - 仅从Eclipse JEE Neon运行/调试Spring Boot应用程序?

转载 作者:行者123 更新时间:2023-12-03 05:57:07 24 4
gpt4 key购买 nike

我会保持快速。

我正在按照the Spring documentation listed here的示例进行操作。当我使用Gradle时,我可以使用以下命令运行该应用程序:

./gradlew bootRun. 

或者我可以使用以下命令构建JAR文件
./gradlew build

运行jar文件

尽管所有这些操作都按照指示进行,但是这很痛苦。当我向老板展示该应用程序时,我想直接通过IDE运行它。每当我右键单击该项目(甚至只是应用程序类)以尝试运行它时,该服务将无法正常工作,只会使我出现以下错误:
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat May 27 22:32:23 EDT 2017
There was an unexpected error (type=Internal Server Error, status=500).
Error resolving template "greeting", template might not exist or might not be accessible by any of the configured Template Resolvers

我用谷歌搜索,似乎找不到解决方案。我尝试创建 src/main/resource/static/home.html,但是没有用。

有没有人可以帮助我解决这个问题?仅作记录, application.properties文件当前读取为:
spring.mobile.devicedelegatingviewresolver.enabled: true

最佳答案

固定它。

所以发生了几件事...

最主要的是,您必须在包资源管理器中实际打开项目,选择应用程序类,右键单击并作为Java项目运行。我只是单击项目,右键单击,然后尝试许多不同的选项(spring应用程序,hello应用程序等)。

关于java - 仅从Eclipse JEE Neon运行/调试Spring Boot应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44223337/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com