Printing log4j version on Spring boot application startup - spring

i need to print log4j version on Spring boot application startup any idea let me know Thank you in ad advance

Related

CVE-2022-22976 spring boot 2.7.0

I have spring boot project version 2.7.0.
I use the dependency-check and it reports CVE-2022-22976.
Do you know how I can solve it?
Spring security version is 5.7.1 while spring starter security version is 2.7.0.
It's a false positive that will be automatically suppressed with the upcoming release 7.1.1: https://github.com/jeremylong/DependencyCheck/issues/4563
Currently, the Spring Boot starter for Spring Security is mistaken with Spring Security itself.
Until then you'll need to suppress it manually with something like
<suppress base="true">
<notes><![CDATA[
FP per issue #4563
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.springframework\.boot/spring-boot-starter-security#.*$</packageUrl>
<cpe>cpe:/a:vmware:spring_security</cpe>
</suppress>

Spring Webflux: How to create a Tomcat WAR for deployment?

I've seen and tryed a lot of tutorial about spring-boot-starter-tomcat. But those worked for spring boot JPA but no for webflux.
Could you help me with that please?
Spring Boot does not support deploying a WebFlux application as a war file. If you want to use WebFlux, you should use jar packaging with an embedded container and launch your app using java -jar.
You can go through below link to understand the choices
webflux-server-choice
Can you please try this see that works?
compile('org.springframework.boot:spring-boot-starter-webflux') {
exclude group: 'org.springframework.boot',
module: 'spring-boot-starter-reactor-netty'
}
compile('org.springframework.boot:spring-boot-starter-tomcat')
This is what I found in this link
Learning Spring Boot 2.0 - Second Edition
Note: I am not sure about this is the right thing to do as I am not sure about the NIO capabilities of tomcat.

Do we really need to add spring boot starter web for spring boot admin clients?

Version 1.5.4 was working fine without extra declaration of starter web in POM of Spring Boot Admin Clients. When I upgraded to 2.0.1, I had to add starter web to POM to make it work. Without starter web in client apps, there is no error or no log related to registering the application.
It's not documented anywhere as far as I know. Can anyone please confirm?
Spring Boot Admin 2.x can run on netty and on tomcat. So if you want to run on tomcat you have to explicitly import the spring-boot-starter-web.
The getting started guide contains this dependency http://codecentric.github.io/spring-boot-admin/current/#set-up-admin-server

Spring boot-hibernate logging on wildfly 10.0.0

I'm trying setup logging for hibernate with spring boot. I have deployed a few wars with spring boot dependencies in Wildfly. What I want to do is setup logging sql queries only for one of one war, so i add below lines in specific application.properties file:
logging.level.org.hibernate=info
logging.level.org.hibernate.SQL=debug
But unfortunately logging level have changed for all applications.
Is there any way to accomplish what I need ?
Thanks in advance.

Logback Appender for Webpage in Spring Boot application

I have a maven and spring boot application which use logback.
This application is on some servers and the log files on this servers are stored only on this server.
Give it a tool/api which is free, can visualize the logs into a webpage and is easy to integrat with spring boot and maven?
I have try JAMon but it will not work with Spring boot (need to deploy a war file) because the spring boot application is a embedded application. Thanks for Help :)
Have a look on Kibana, search for ELK-Stack. You can easily run it using Docker. There is also a Maven lib for the logstash-forwarder.

Resources