when I start the keycloak server after few minutes its automatically gets terminated, I want to add keycloak server to windows services.
Related
I deployed a Spring boot app on Azure and config Authentication.
After deployed success, I clicked in to App Service URL (HTTPs) and and executed some authorization steps and do more.
However, When I checked URL in HttpServletRequest. It is HTTP not HTTPs.
Does I need config more TLS/SSL in Azure App Service and source code ?
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.
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/
I have an Angular application deployed to/via IIS. This app is sending requests to REST endpoints exposed by a Spring Boot application which I am running as a Windows Service (The Spring Boot application is accessing a MongoDB but this should not be relevant, I think). The exposed REST interface is accessable via port 8080 on the servers localhost.
The Angular app is accessible as it should be but there seems to be a problem when the web app tries to access the Spring Application's REST interfaces. More specific: The client seems to be receiving HTML documents when he should be receiving JSON files.
I am new to working with IIS so beginner errors are not unlikely. I'm happy to share more information if needed!
Edit: I read again the question, and understood something wrong:
Looks like you were sending requests to your Angular server. For development you should use the embedded web server (https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html) in order to ease your server configuration steps. And from within the windows server, send request to localhost:springboot_port.
Once you want your service to be available for an external client, and to keep your service available/awake (something similar to systemd in Linux), you could try this: https://www.baeldung.com/spring-boot-app-as-a-service
Some Web Application is managed by Spring 4.0 Framework, the Spring Security 3.2 is used also to authenticate users with remember Me feature.
The remember Me and Security is realized by JDBC Support (the needed data are saved in database).
A lot of Spring Beans is used, that are created as "spring" singletons
This Web Applicaton runs in TOMCAT7 Servlet Container, that installed in "classic" Host Sever.
This web application will be runs in production within TOMCAT7, that managed by some Cloud Provider - either in AWS Elastic Beanstalk or in EC2 Instance direct with instaled TOMCAT with autoscaling
That means, that at the first moment runs only ONE EC2 Instance, that has running TOMCAT Server 1. This server has initialized Spring Beans, holding in JVM 1.
But at "peak time" the second instance of EC2 will be started. The TOMCAT2 Server will be started also.
Is it possible, that a USER1, that was authenticated at first moment on TOMCAT1, have a problem with authentication and other business operations realized in WEb Application, if the load balancer routes the user1'Requests after start of TOMMCAT2 to TOMCAT2???
i don't know, whether Spring 4.0 or Spring Security are stateless by default.
You can consider using Elastic Load Balancer sticky sessions for your application.
Read about using Sticky Sesions here:
http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html
Read about using Sticky Sessions with Elastic Beanstalk here:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.elb.html
Read about Stickiness policy here:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html