How can I show the build and application version in quarkus application? - quarkus

Like Spring Boot Actuator Info endpoint, is it possible to show the application version and build info in quarkus application?

I don't think there's anything like that in Quarkus at the moment. You'll probably have to create the properties in your application.properties and add them in the responses, for example.
Configuring Your Application - Quarkus guide

Try using Micrometer Metrics library. Might not have all the metrics and info you are looking for, but you will get plenty of information.
Micrometer - https://quarkus.io/guides/micrometer
SmallRye Health - https://quarkus.io/guides/smallrye-health - Health Check
Build Info(Maven Goal) - https://quarkus.io/guides/maven-tooling#project-info
I guess these all should help.

Related

Spring Boot actuator "system.cpu.usage" vs "process.cpu.usage"

I am using spring boot 2.3.2. With help of actuator, publishing the application metrics to metrics console. I would like to know what is the difference between system.cpu.usage and process.cpu.usage metrics polished by the actuator.
Based on source code
system.cpu.usage -- The recent cpu usage for the whole system
process.cpu.usage -- The recent cpu usage for the Java Virtual Machine process
For more info about these metrics you can look at java doc of this bean OperatingSystemMXBean

Where is keycloak starter for Spring Boot?

I'd need to use keycloak in my Spring Boot project. I can see from the many tutorials that it should be available in the Spring Boot Initializr:
However I cannot find it (anymore?) neither with the Cloud app, nor with "spring init". Has it been removed as starter?
Thanks
Yes it has been removed, see this issue for more details. In general going to https://github.com/spring-io/start.spring.io and searching in issues could be an effective way to get some information about the evolution of the service in general.

BPMN for spring boot 2

We have started new project on spring stack and using latest versions. But we have workflow requirement and I used activiti in past. But as I see there is no spring boot 2 support for activiti and camunda. Can anybody suggest which BPM is best that can be integrated with spring boot 2.
You will find a bunch of Spring Boot 2 starters in the Flowable github repo.
The documentation explains step-by-step how to create a BPM enabled Spring Boot application. There is also the blog post The road to Spring Boot 2.0 that the improved support for Flowable within Spring Boot as part of the Flowable 6.3.0 release.
You ask for suggestions on which BPM is best. Well, I cannot be objective since I am part of the Flowable Team, but I can say that our Spring Boot implementation is pretty neat:
All engines are supported (BPMN, CMMN, DMN), both embedded and exposing their respective REST APIs.
There is an automatic configuration of Spring Security to use the Flowable IDM engine (in case no other custom security is configured).
There is no "EE" version of the starter. Flowable provides Spring Boot 2 support 100% Open Source.
The Spring Actuator integration is quite powerful.
Did I mention Open Source? ;-)
In order to get the all engines you would need to use the flowable-spring-boot-starter(-rest) dependency. The (-rest) needs to be used if you want the Flowable REST APIs to be automatically configured.
There is also the option to run the BPMN, CMMN or DMN engines in standalone mode. For that you would need one of the following dependencies:
flowable-spring-boot-starter-process(-rest)
flowable-spring-boot-starter-cmmn(-rest)
flowable-spring-boot-starter-dmn(-rest)
So, compare for yourself, but for me, it's pretty clear and of course I am open to discussion.
The Activiti is working on Activiti Cloud fully based on Spring Boot 2 and Spring Cloud Finchley (targeting kubernetes deployments, but it can be used outside kubernetes if that is not your thing) if you are looking for a BPMN runtime for Cloud Native applications. We are working hard on releasing the first Beta1 release at the moment, and we will very welcome feedback about it. Hope this helps.
If you use the camunda-bpm-spring-boot-starter you can write self contained services running camunda process engine with spring boot 2.

Spring Boot 2.x Metrics classes

I have started using spring boot 2.0.0-Snapshot and I see that all Metric related classes and interfaces does not exists ?
Example:
The jar spring-boot-actuator-2.0.0.BUILD-SNAPSHOT.jar does not have package
org.springframework.boot.actuate.metrics.writer at all
Are they moved to somewhere else?
In Spring Boot 2 the previous metrics implementation has been replaced by integration with Micrometer. From the release notes:
Spring Boot’s own metrics have been replaced with support, including auto-configuration, for Micrometer and dimensional metrics. You can learn more about Micrometer in its user manual and Spring Boot’s reference guide
I can't find any guide for migrating from 1.x Spring Boot Metrics to 2.x Spring Boot Metrics but this change is quite recent so I suspect any such docs are a TODO. In the meantime, you could perhaps dig into the Pull Request or follow the Spring Boot 2 docs ...
Micrometer provides a separate module for each supported monitoring system. Depending on one (or more) of these modules is sufficient to get started with Micrometer in your Spring Boot application. To learn more about Micrometer’s capabilities, please refer to its reference documentation.

how to deploy Spring boot actuate application in external tomcat server

Im trying to just use the basic endpoints that comes with spring actuate and want to deploy in the external tomcat server without using spring boot. How to achieve this, could anyone help me please. Is there any configuration changes that I need to do. This website gives an idea but it uses older version of spring-boot-actuate. Also EndpointHandlerMapping and EndpointHandlerAdapter doesnt come with newer version of spring boot actuate.
Anyways I get 404 resource not found when deploying to the server.
Check out this question to see if it helps you. The Actuator component is a Spring Boot feature but you can use individual components within an existing application with the right build and configuration setups.

Resources