Can I use Spring Boot Admin on microservice? - spring-boot

I have a Spring Boot application which contains a Spring Batch mechanism that we run without an endpoint (reading from an API and updating the database), and in my application.yml we have web-application-type: none.
My application is not runnable using gradle boot:run, but I need to monitor its performance using SBA, the application is deployed as a jar, and I am running it using a ksh script.
Can I use SBA on a none-web Spring Boot app? How can I deploy it so it can monitor a jar?

Related

Is it possible to deploy Spring application in SCDF 2.10?

If I have Spring batch jobs bundled within a Spring (Spring version 5.3)application (not a Springboot), Would I still be able to deploy in SCDF-2.10 server, by registering each of these jobs as tasks ? Will this work? Would I be able to register these Spring apps as 'App' in Data flow server? And could I still be able to use Data flow Shell , to register them?
Have already tested Springboot applications on SCDF server by registering as Tasks, but did not find any info on Spring Applications
The SCDF ecosystem was designed around Spring Boot applications. However there is support for polyglot applications.
If the application is packaged in a container and registered as a task, the container will be launched.
If you want it to be visible as a Task then it should include Spring Cloud Task 2.4.x with properties to access the SCDF datasource. These will be provided in the same format as expected by a Spring Boot application.

Is there a way I can integrate the spring boot application jar to another servlet application?

I have created a spring boot application with a few endpoints and want to make that endpoint to the existing servlet application without deploying it separately. So I want to create a jar from the spring boot app and use that jar in the servlet project. How can this be done? Any suggestion would be really helpful.

How to check the java application (non spring boot) if it is up or down

I have this requirement that I need to check if the java application (not web app) is running or down via bash script.
It is non springboot application as well. It is just a normal spring application that connects and listen to kafka, get the the object from the topic and call an API.
We thought of to use spring actuator to check the health however it is not a web application.
What is the recommended way to check a non-web and non-springboot application if it is up or down?
Please advise.

Spring boot webservice to start and be discoverable when JBOSS EAP starts

We need to create independent spring boot web services for our apps which runs in JBOSS EAP. Can we do the below if its possible.
Spring Boot is typically deployed as a runnable jar but our apps are EAR deployed. Can we bootstrap / launch the spring boot listener / controller when the EAR application starts)
Can we register the services on start to facilitate automated discoverability of services (typically done with consul/ etcd/ zookeeper etc)
You can generate a WAR instead of a JAR and deploy this. If this is not ok you can put the WAR in an EAR
Read the docs: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html
Yes. If you have a service registry in place you can use this with Spring Cloud.
Please read the documentation:
https://spring.io/guides/gs/service-registration-and-discovery/

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

Resources