~ / archivo / stackoverflow / 51050609
Spring boot WAR deployment to tomcat
StackOverflow
· spring-boot, tomcat, war, tomcat8, spring-boot-maven-plugin
· ayudé
-
Khaleel Mohamed pregunta 2018-06-26 20:03
I have recently started packaging my application as a war.
I have noticed whenever I deploy the application within tomcat, 404 errors are now placed into tags, where as when deploying as a standalone, the _body response would be in JSON. Does anyone know why this is happening?
Within the tomcat on a war deployment I get the return _body:
<.!doctype html><.html lang="en"><.head><.title>HTTP Status 404 – Not Found<./title>On a standalone deployment the return _body =
"{"timestamp":"2018-06-26T18:28:38.731+0000","message":"04ed1a7a-729d-48d7-b306-8e9ff6d7a2e0","details":"uri=/api/userSecurity/login","status":4011003}"Is there maybe some sort of tomcat setting that is causing this?
Thank you
- Miguel Ortiz yo 2018-06-26 20:20 What is the expected output? Maybe this could be helpful: mkyong.com/spring-boot/spring-boot-deploy-war-file-to-tomcat
- Khaleel Mohamed 2018-06-27 03:31 Thank you for your response, that link was really helpful.
- Miguel Ortiz yo 2018-06-27 03:43 Cool man, did it solved your problem?
- Khaleel Mohamed 2018-06-27 03:49 It did solve my problem.
-
The user solved the problem by preparing the application with bootstrap to be deployed in tomcat as explained here.