Reputation: 125
I have problem, i make Spring Boot app and i have bigger problem with deploy it than write it. So, when i start my app manualy from IDE STS, app work fine, but when i pack it to .jar and try run it from CMD with command java -jar appname.jar . Application run but when i want to visit any page, i get error 404.
I think it is some problem with package process. When i run project from cmd and i try to enter on any site ( http : //localhost:8080/answers for example) in CMD i get new line with SQL request... so Controllers are ok, application cant see .jsp files.
in application.properties
i have :
spring.mvc.view.prefix= /WEB-INF/views/
spring.mvc.view.suffix= .jsp
I have all needed dependencies in my POM : [https://pastebin.com/c0hqwYT8][1]
My application.class is like tutorials : [https://pastebin.com/yHscwEm0][1]
My project structure : [http://imgur.com/a/LEciD][1]
[http://imgur.com/a/LvaWc][1]
Upvotes: 0
Views: 1312
Reputation: 125
I HAVE IT ! I must put my views to /src/main/resources/META-INF/resources/WEB-INF/ Path like in this tutorial : https://dzone.com/articles/spring-boot-with-jsps-in-executable-jars-1
Upvotes: 1