Deploy SpringBoot Api into IIS Web Server - spring-boot

I created spring boot api with gradle build. everything working fine in my local.
I deployed angular app in Sites/DefaultsTest in IIS web server. it run in https://example.app.com/app
SpringBoot API base path is '/api'
I want to deploy spring boot api in same windows server machine and should able to access through Angular App globally.
please guide me.
IIS WebServer Dashboard

As far as I know, the spring boot API is a java web application, we don't suggest you directly hosted the java web application in the IIS.
I suggest you could try to install a docker or using tomcat to host the application, then you could use IIS reverse proxy to redirect the request to that API to get the result.
More details about how host the spring boot application on the docker, you could refer to below article.
https://blog.codecentric.de/en/2017/04/ansible-docker-windows-containers-spring-boot/
More details about how to use IIS reverse proxy, you could refer to below article.
https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/

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.

How can I deploy a Spring Boot REST API to BanaHost cPanel?

I created a full stack application (Angular front end, java spring boot back end, mysql database), and I was able to upload successfully both the angular files and mysql into BanaHost cPanel, however I have not found useful information on how to upload spring boot REST API, as a consequence only the front end is working. How can I deploy this REST API on cpanel?
Spring Boot Applications can't just upload and deploy if you're utilizing a cPanel Web hosting (shared) plan, like you deployed the Angular Application by uploading.
For spring boot you must do it yourself, a Virtual Private Server or Dedicated Server will unlock the site hosting restriction. If you are not much familiar with the Linux command line, you can use a Window VPS instead. Providers like, Digital Ocean, Linode, and Oracle Cloud all provide free trials.
And also, there are platforms, such as Heroku (Platform as a Service(PaSS)), where you can deploy your app without the need for a VPS. You can refer their documentation regarding this:
https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku

How to run a Spring Boot Application in a real online website instead of localhost:8080

I've created an application with the spring boot framework.
Everything runs fine on the localhost:8080.
Now I want to be able to run the application from my website.
So people can log in to the app and use the application from anywhere over the internet.
What should I do to manage this?

how to deploy springboot app in windows server 2012?

I'm developing a SpringBoot app and I need to deploy it on a remote server running Windows Server 2012. I tried running the app from eclipse there, and i can access locally from the server, but when I try to access from other devide using the IP of the server it has no response. Any idea about how can I deploy it? The app runs on port 8080, so the URL is locally: localhost:8080/start/
but when i access XXX.XXX.XXX.XXX:8080/access/ there is no answer
I beg you to help me, I'm desperate
When you run your application in eclipse , the tomcat might be configured to listen to localhost, but still if your remote is in the same network as your local system you should be able to access the endpoints without fail.Make sure that the remote is open to the public , otherwise it won't be accessible to other devices.
If you are using spring-boot to create an executable war or jar to be deployed to a remote server for long term , you can use the Windows service wrapper provided by springboot itself to register your application as a service in windows.
Please read the doc and the sample code to implement it.
You may have to enable CORS--- #CrossOrigin on top of your controller class where you have you #RestController annotation

How to access spring application deployed in openshift's tomcat?

I have created a simple spring boot application and deployed it to openshift redhat (as Tomcat 7 application) through my OpenShift explorer from my Eclipse SDE.
When I tried to access from my openshift domain url, It showing status 404 but same application is working fine in my local.
My local url:
http://localhost:8082/TestApp/testme.do
My openshift url:
http://test-{mydomain}.rhcloud.com/TestApp/testme.do
Is there any specific way to access the openshift application url?
Thanks in advance for those giving assistance, Please let me know if you need additional details.
Regards,
Dhana.

Resources