简体   繁体   中英

file.html beeing correctly displayed on localhost but not on server

Im using spingboot for my project. I created some subfolders under "template" and registred those domains as followed on maven.

registry.addViewController("/websitefolder/mywebsite").setViewName("mywebsite");

i also tried it like this:

registry.addViewController("/websitefolder/mywebsite").setViewName("websitefolder/mywebsite");

The Problem is that on localhost:8080 the webpage is beeing displayed correctly but on the testserver i get a "505" error.

localhost url:

localhost8080/websitefolder/mywebsite

server url:

ip.ip.ip.ip/server-test/websitefolder/mywebsite

Does anyone know if the registry on maven is wrong or if i should do it differently?

Thanks for the help!

Is server-test a path? If so you need to change the registry:

registry.addViewController("/server-test/websitefolder/mywebsite").setViewName("websitefolder/mywebsite");

simply change the registry for the server-test path

registry.addViewController
("/server-test/websitefolder/mywebsite").setViewName("websitefolder/mywebsite");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM