Spring Rest Data Application in Google Appengine - spring

I've a Spring rest service Application with spring Data Repositories,which I want to deploy to Google APP engine.
But when i try to activate the Google AppEngine settings in my Project properties it comes to an error as soon as i enter a value for Applications ID. cannot set application ID(appengine-web.XML)
I want to put a appegine-web.XML into WEB-INF folder, but WEB-INF folder does not exist in my project.

Related

How do I connect my Azure frontend static web app to my Azure backend app service via endpoints?

For a learning project we've built a frontend and backend application. The frontend "application" is just a bunch of linked html/css/javascript files. The backend application is a spring boot / maven / java project with some endpoints.
When I run the backend application locally I am able to send a GET-request successfully using Postman. Now we've hosted the backend application via Azure and I have no idea how I can send a GET-request, I don't know which url to use.
After I get this to work I'd like to connect front- and backend application using these url's.
As you can run the backend application in your local environment successfully, you have to follow the below steps to configure and deploy the spring boot web app to azure app service:
In a terminal window, run the following command to configure your web app with the Azure Maven Plugin
./mvnw com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config
Then, at the Command Prompt, run this maven command and set the default configurations by typing ENTER and Confirm (Y/N) => 'y' and the configuration will gets completed.
Once you've done with the above steps, run
mvn azure-webapp:deploy to publish the web app to Azure.
Your webapp URL will be displayed in the output.
I don't know which url to use?
You can use that URL from maven console output and access the web-app.
Also Refer this SO thread to know how to deploy frontend and backend to the same app service plan.

SpringBoot Rest API: Works as Java Application, fails when deployed on tomcat

I have a Springboot project and it has a api which I can invoke from postman.
When I run the application using Main Class I'm able to hit the endpoint and get response.
But if I deploy it on tomcat using war of project the same endpoint says 404!
What am I missing?
There can be multiple possibilities
You didn't extended your application class to SpringBootServletInitializer. In this case, spring boot application will not be deployed to tomcat. To fix this add "extends SpringBootServletInitializer" to your main application class
You are hitting wrong url. Make sure you append your aplication name to url. Example - if http://localhost:8080/data works in your local, and your application name is app, you have to hit http://{{serverip:port}}/app/data when deployed
There is something wrong in application properties like DB configured is local and not accessible from tomcat etc. To check such issues, check your tomcat log file (/{{tomcat dir}}/logs/catalina.out

Aws Spring boot application view issue with jar and rest service issue with war

I would like to host one application on AWS elastic beanstalk(java). The application has one view and one rest service. First I uploaded the jar file and tried accessing, the path to view was giving me whitelabel error on AWS but it is working fine locally. Also, am able to access the rest service with jar.
After surfing the net, I created a war and uploaded on AWS(tomcat). Now, the view is working fine but I notice the path of rest service is returning 404. Can someone suggest what should I check or do?

Google app engine flexible not load context path of Spring boot application

I have spring boot application and already deploy on GAE Flexible env.
In my application, I already set my application context path in application.properties file look like:
server.context-path=/myapp
And it work fine on tomcat and jetty embedded server.
But when I deploy to GAE flex env my application not work with context path that I already set on my application.properties file.
It auto use context path "/" in GAE domain.
Because I'm using dispatch to defined routing on GAE with multi microservice, so I have to define a specify context path for each service.
Anybody can help me in this case?
Thanks.

UI application in Pivotal Cloud Foundry

I have a UI application built using Angular , Bootstrap and HTML5 which interacts with number of backend services. In order to deploy this application in PCF , should this be converted to a Spring Boot app? Or is there a way to use any of available buildpacks to deploy this UI app in PCF?
In case there is no need to deploy backend services, I would go with the cloudfoundry static buildpack.
http://docs.cloudfoundry.org/buildpacks/staticfile/index.html
Otherwise you will need to decide how you are going to deploy the backend services for this application. There are a number of buildpacks available that could be used for deploying the backend services and delivering the frontend content within the same app (one of them being, as you mentioned the java buildpack that can be used to deploy a spring boot app). Here is a list of available buildpacks:
http://docs.cloudfoundry.org/buildpacks/
Its not needed to convert your application to spring boot, but doing so will definitely make life easier for you, trust me. Once u convert ur app to a spring boot right, you can remote debug ur application by jst running ur app as a spring boot app.

Resources