0
我使用的是Spring/Spring Boot /和Ember。我想将我的index.html文件放在“localhost”主文件夹中,但我不知道Spring Tool Suite如何部署Spring Boot。 HTML开发和访问Spring REST服务器的正常过程是什么,而没有发生跨站点脚本错误?当使用Spring + Spring Boot + STS时,Spring Project目录中的localhost是“home”文件夹?
我的文件夹结构如下:
/.settings
/BookingClient
/gradle
/html (this is where my index.html, css, and all Ember related JS stuff is)
/node_modules
/src
/target
我猜在/ target目录,但没有我曾尝试已经工作了的地方。
它不工作的原因。我创建了这个文件夹:'workspace-sts-3.6.0.M1 \ BookingSoftware2 \ src \ main \ resources \ static',并在那里放入一个名为test.html的简单html文件。然后我尝试:'http:// localhost:8080/test.html'并得到这个错误:'有一个意外的错误(type = Not Found,status = 404)。' – 2015-02-08 15:06:35
我明白了!它不在静态文件夹中。对于我来说,src/main/webapp文件夹有窍门。你的回答让我得出了这个结论,所以我非常感谢你的帮助! – 2015-02-08 15:14:15