Closed emeraldhieu closed 2 years ago
The JHipster-Registry is not adapt by default to work within Tomcat. It is a standalone Java application that can run as a desktop application or be configured as a system service.
Servlet containers like Tomcat expect the registry to meet some contracts to be deployed. You must initialize the Servlet context required by Tomcat by implementing the SpringBootServletInitializer interface.
You can see the follow implementation in generator : https://github.com/jhipster/generator-jhipster/blob/main/generators/server/templates/src/main/java/package/ApplicationWebXml.java.ejs
Overview of the issue
JHipster can't be accessed when deployed on Tomcat 9
Motivation for or Use Case
I'd like to deploy JHipster Registry on Tomcat along with other services to reduce the amount of embeded container if using Spring Boot
Reproduce the error
1) Checkout jhipster-registry 2) Prepare "central-config" correctly in jhipster-registry 3) mvn clean package -DskipTests -Pprod 4) Copy the war file into Tomcat's webapps 5) Add this config to server.xml with the hope that I can access JHipster Registry via "localhost:8761"
6) Start Tomcat 7) Logs look good; no error 8) Access http://localhost:8761 shows "HTTP 404 Not Found"
Related issues
Nothing
Suggest a Fix
I don't quite know.
JHipster Registry Version(s)
6.8.0
Browsers and Operating System
MacOS, Chrome