单独使用Eclipse Jee霓虹灯运行/调试春季启动应用程序



我将保持快速。

我正在遵循此处列出的弹簧文档的示例。当我使用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应用程序等(。

最新更新