how to setup the Spring Boot Admin Server via war-deployment in a external tomcat? - spring

I'm trying to set up spring-boot-admin via war deployment. for war i'm not able to see the client application in spring boot admin dashboard.
I've tried with spring boot version 2.1.6 and tomcat version 8.5.47 but i'm not able to see the client application in dashboard.
My client application POM
<version>1.0.0</version>
<packaging>war</packaging>
<name>spring-boot-admin-client</name>
<description>Demo project for Spring Boot Admin - Client</description>
Dependencies I have used:
spring-boot-starter-actuator
spring-boot-admin-starter-client
spring-boot-starter-security
spring-boot-starter-test
spring-boot-starter-web
Not getting any error message but client application i'm not able to see it in spring-boot-admin dashboard.

Have u configured spring.boot.admin.client.instance.service-url property in client application?
Generally when Spring Boot Client is installed on external tomcat, SBA predicts the actuator endpoints path as http://server:port/actuator while the actual path is http://server:port/context-root/actuator.
This is where spring.boot.admin.client.instance.service-url property comes to the rescue. spring.boot.admin.client.instance.service-url should be set as http://server:port/context-root

Related

How do I add SSL configuration to JBOSS standalone file for a Spring Boot application?

We have a Spring Boot application that we need to deploy to a JBOSS server. We have a requirement to keep all configuration in the JBOSS standalone.xml file. I need to get SSL set up on the Spring Boot application, but every guide I find shows how to add it to application.properties. How can I tell the Spring Boot application to use the SSL configuration from the JBOSS standalone.xml file?

How to deploy Spring Cloud Gateway 2.1 on Jboss or Tomcat?

I want to a deploy Spring Cloud Gateway but it is built on Spring Framework 5, Project Reactor.
Can I create a WAR file and deploy it on a traditional application server such as Jboss or Tomcat.
The Spring documentation in this page says it is possible.
Spring WebFlux is supported on Tomcat, Jetty, Servlet 3.1+ containers
Note:
this is Spring Cloud Gateway project link
https://spring.io/projects/spring-cloud-gateway
I don't think this is possible, as Spring Cloud Gateway is itself a Spring Boot WebFlux application and this use case is only supported with embedded servers, as mentioned in the Spring Boot reference documentation.

Spring boot 2 with webflux and Router functions war does not work with standalone tomcat server

The application runs fine on spring boot embedded tomcat 8.5.28 (gradle bootRun) but when I create the war and put the same in stand alone tomcat server (8.5.28) the application always throws 404 for any of the routes configured.
The application runs fine on spring boot embedded tomcat 8.5.28 (gradle bootRun) but when I create the war and put the same in stand alone tomcat server (8.5.28) the application always throws 404 for any of the routes configured.
Spring Boot 2.0 does not currently support WAR deployment for WebFlux applications.
See the Spring Boot issue you created: https://github.com/spring-projects/spring-boot/issues/12455

Using Spring Boot Thymeleaf by do not run as a web application

I have a Spring Boot application that uses Thymeleaf for email templating. My application is not a web application though.
However, when including the spring boot starter thymeleaf dependency:
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
Spring MVC is transitively included and eventually Servlet.class in my class path signaling that my application is a web application... which then has the undesirable result of running my application in the Tomcat servlet container (by default on port 8080).
How can I use the features of Spring Boot Thymeleaf (such as configuring in a props file ala https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html) without my application running as a web application?
Setting the following property as follows prevents the Spring Boot application from running as web application:
spring.main.web-environment=false

Eureka Client and spring integration

I am trying to make my Spring application as Discovery Client. But the moment I add the following dependency
<dependency>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-client</artifactId>
<version>1.1.37</version>
</dependency>
the GWT webapp fails to launch with 503 Service unavailable. Can netflix Eureka be used only with spring boot or spring cloud applications?
Resolved:
The version that I was using was very old. updated the version to 1.1.159 and everything is working fine.

Resources