I have two project :
TRS: spring web project that generate war file
TRS-boot : spring boot app that is jar and have config file and TRS
app as dependency
my question is that,when I develop app I run TRS-boot and every thin is ok but when I want to give a publish to test team to run in external server , I have to create war file from TRS...
what is the best solution to give them a app version that is war file easily?
is it good to make TRS a spring boot app and jar, if is good ....how to make war file?
please give me best solution
thanks.
Related
I just started to work with the azure platform and I have a Question.
I upload my app to azure and run it but when I try to access it, it does not work but returns a 404 not found.
Maybe I did something wrong?
This is the repo that I connected:
https://github.com/idanovadia/ServerAlgoSearchImplementation_v2
for example when I run it on local host :
http://localhost:8080/getMaze/prim
now I tried :
https://searchnow.azurewebsites.net/getMaze/prim
I see that you try to package your java app to a jar file, and run the jar with a web.config in web app. This is the old way to run spring boot application.
In fact, there is a common and better way. It is just to package your spring boot application to a war package. And then you can deploy it to Azure web app with tomcat container.
1. You need to choose to package as war when you initialize the spring boot project:
2. Set the packaged file name to ROOT.war
Open the pom.xml, add the following line:
Then you will get a ROOT.war file if you run mvn clean package
3. Create a web app with Tomcat
4. Deploy ROOT.war under \site\wwwroot\webapps folder in web app
5. Restart your web app.
Below my project structure
I have multiple modules in one parent maven project.
Many of above modules can also run as independent project including some of them as Openshift applications. These are spring boot applications
Now I want to add one more module as Spring boot web application on Openshift that uses Spring web in build tomcat.
Also I have multiple property files which are specific to environment and I load them as Configmaps on Openshift.
Now when I am trying to deploy the new web application, it is not able to use the Configmaps. It error says property file not found. I am sure this is because the Configmaps are outside of the tomcat and application.
Can I have any work around as I don't want to put those property files in the war while building but should get added when I deploy or start the pod on Openshift.
In short I want something like I can put configmaps as files into the class path spring boot web application that uses in built tomcat.
Mount the ConfigMap-s as volumes at some path and then configure Spring Boot as described here.
I am new to Spring boot and angular so lease bear with me if something is not clear in the question or I am asking something trivial. I downloaded a sample project for learning purposes and I am able to deploy the application
Project structure
I have a REST spring boot application with an empty webapp directory
Angular project is a separate module which is built by running ng build in the parent folder and when the project is built the angular assets are moved to webapp folder of the spring project
Then running the mvn clean install I generate the war file for the application and deploy it using simple Run Application.java
Now the problem with the project is every time I make a change in the Angular project I have to re-deploy the whole application :(
I was wondering if there is a way to hotswap resources i.e. webapp files in the deployed war when I make changes to the UI using IntelliJ IDE
I have visited the following questions on this topic and nothing has helped so far.
StackOverflow Help
JetBrains support ticket
Spring Docs
I have a Maven Web Application with Spring MVC and I need to convert it into a Java Web Application build with Ant. I am using Netbeans. The path structure should be the same? What configuration files should I add, remove, or change?
The reason of the change is beacuse I need to run the application without Internet connection.
I'm developing a simple maven web application using angular and java inside a same project.For front-end I use webapp/resources as the path.The problem was when I edit some javascipt/css or other static resources then I have to re-deploy the whole application.Is there a way to deploy only web files instead of re-deploying the whole app.I'm using 'tomcat7-maven-plugin' for building purpose.
thanks.