java - Thymeleaf + Spring Boot: Error resolving template -
i have basic springboot app. using spring initializer, embedded tomcat, thymeleaf template engine, , package executable jar file.
i have properties in application.properties
server.contextpath=/pecador server.port=5678 running through eclipse can access application , fine
http://localhost:5678/pecador/login but when deploy application in server , running command:
sudo nohup java -jar pecadorcloudapp-0.0.1-snapshot.jar & /tmp 2>> /dev/null >> /dev/null & and try http://149.152.231.117:5678/pecador/login
i got error:
org.thymeleaf.exceptions.templateinputexception: error resolving template "/pecador/login/login", template might not exist or might not accessible of configured template resolvers and unzipping jar template there, under:
pecadorapp.jar/boot-inf/classes/templates/pecador/login/login.html
it looks you're returning view name leading slash(/). return pecador/login/login , should work in both environments.
check this: https://github.com/spring-projects/spring-boot/issues/1744
wiki
Comments
Post a Comment