Hello everyone
I’m trying to connect to the spring boot admin app, but I don’t know what i’m doing wrong. usually in a Spring boot app I add the dependencies to the pom.xml, this is the version I’m using
...
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.9</version>
<relativePath/>
</parent>
<properties>
<java.version>17</java.version>
<vaadin.version>24.1.4</vaadin.version>
<selenium.version>4.10.0</selenium.version>
<spring-cloud.version>2022.0.4</spring-cloud.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.targer>${java.version}</maven.compiler.targer>
</properties>
...
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
...
Also in properties.yaml
spring:
application:
name: hexagon-primary
boot:
admin:
client:
url: http://localhost:7070
management:
endpoint:
health:
show-details: always
endpoints:
web:
exposure:
include: "*"
And finally in SecurityConfiguration.java
@EnableWebSecurity
@Configuration
public class SecurityConfiguration extends VaadinWebSecurity {
public static final String LOGOUT_URL = "/";
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(auth ->
auth.requestMatchers(
AntPathRequestMatcher.antMatcher("/actuator/**")).permitAll());
super.configure(http);
setLoginView(http, LoginView.class, LOGOUT_URL);
}
}
If i access to the actuator url expose by vaadin app I see it working, but in my Spring boot admin i can’t see the vaadin app. If i use the same conf in a normal spring boot app, the app can connect to admin.
What I’m missing?
Thanks for your attention
Best regards