春季启动MVC JSP-> mvn install-> 404 [英] spring boot mvc jsp --> mvn install --> 404

查看:66
本文介绍了春季启动MVC JSP-> mvn install-> 404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在跟踪此示例,春季启动MVC + JSP ... http://www.leveluplunch.com/java/tutorials/003-getting-started-with-spring-boot/

I am following this sample, spring boot MVC + JSP...http://www.leveluplunch.com/java/tutorials/003-getting-started-with-spring-boot/

它在eclipse中效果很好,但是,当我在JAR文件中进行部署(MVN安装)和Java -jar时...我使用此链接 http://localhost:8080/jsptest ....并转到404.

it works great in eclipse, but, when i make the deploy (mvn install) and java -jar at JAR file... i use this link http://localhost:8080/jsptest.... and go to 404.

Spring Boot MVC中有一些针对JSP的规则吗?

there is some rules for JSP in spring boot MVC?

该应用程序很简单...并且可以在Eclipse上运行,但jar却不能.

the app is simple...and work on eclipse, but the jar does´t.

有什么主意吗?

推荐答案

404表示资源不可用.

404 means resource not available.

典型的故障排除包括:

1)检查您的Spring Boot服务器状态.它开始时没有任何错误吗?

1) Check your spring boot server status. Did it start without any errors?

2)检查localhost:8080/mappings处的可用映射.您在该页面上看到映射了吗?

2) check available mappings at localhost:8080/mappings. Did you see your mapping on that page?

3)当您访问URL时,日志文件中会发生什么?

3) When you access the URL what happens in the log file?

4)当您说它在eclipse中运行良好时,您是否将其部署到了任何服务器上?还是从命令行运行它?并尝试找出eclipse启动配置和java -jar启动配置之间的区别.

4) When you say it works fine in eclipse, did you deploy it to any server? or did you run it from command line? And try to find out the difference between eclipse launch configuration and java -jar launch configuration.

这篇关于春季启动MVC JSP-> mvn install-> 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆