Merge pull request #3410 from eugenp/BAEL-1430-v2
move actuator 2 to spring-5-reactive
This commit is contained in:
commit
afb2191c4c
|
@ -43,6 +43,10 @@
|
||||||
<groupId>javax.json.bind</groupId>
|
<groupId>javax.json.bind</groupId>
|
||||||
<artifactId>javax.json.bind-api</artifactId>
|
<artifactId>javax.json.bind-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Dependencies for Yasson -->
|
<!-- Dependencies for Yasson -->
|
||||||
<!-- <dependency> -->
|
<!-- <dependency> -->
|
||||||
|
@ -198,4 +202,5 @@
|
||||||
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
|
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.actuator;
|
package com.baeldung.reactive.actuator;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.health.Health;
|
import org.springframework.boot.actuate.health.Health;
|
||||||
import org.springframework.boot.actuate.health.ReactiveHealthIndicator;
|
import org.springframework.boot.actuate.health.ReactiveHealthIndicator;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.actuator;
|
package com.baeldung.reactive.actuator;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.endpoint.annotation.*;
|
import org.springframework.boot.actuate.endpoint.annotation.*;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.baeldung.actuator;
|
package com.baeldung.reactive.actuator;
|
||||||
|
|
||||||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
|
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
|
||||||
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
|
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
|
|
@ -1 +1,4 @@
|
||||||
logging.level.root=INFO
|
logging.level.root=INFO
|
||||||
|
|
||||||
|
management.endpoints.web.expose=*
|
||||||
|
info.app.name=Spring Boot 2 actuator Application
|
|
@ -1,6 +1,5 @@
|
||||||
package com.baeldung.actuator;
|
package com.baeldung.reactive.actuator;
|
||||||
|
|
||||||
import com.baeldung.jsonb.Spring5Application;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -10,12 +9,14 @@ import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
import com.baeldung.reactive.Spring5ReactiveApplication;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Spring5Application.class)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Spring5ReactiveApplication.class)
|
||||||
public class ActuatorInfoIntegrationTest {
|
public class ActuatorInfoIntegrationTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
|
@ -43,10 +43,6 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-hateoas</artifactId>
|
<artifactId>spring-boot-starter-hateoas</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectreactor</groupId>
|
<groupId>org.projectreactor</groupId>
|
||||||
<artifactId>reactor-spring</artifactId>
|
<artifactId>reactor-spring</artifactId>
|
||||||
|
|
|
@ -17,7 +17,6 @@ public class SecurityConfig {
|
||||||
public SecurityWebFilterChain securitygWebFilterChain(ServerHttpSecurity http) {
|
public SecurityWebFilterChain securitygWebFilterChain(ServerHttpSecurity http) {
|
||||||
return http.authorizeExchange()
|
return http.authorizeExchange()
|
||||||
.pathMatchers("/admin").hasAuthority("ROLE_ADMIN")
|
.pathMatchers("/admin").hasAuthority("ROLE_ADMIN")
|
||||||
.pathMatchers("/actuator/**").permitAll()
|
|
||||||
.anyExchange().authenticated()
|
.anyExchange().authenticated()
|
||||||
.and().formLogin()
|
.and().formLogin()
|
||||||
.and().build();
|
.and().build();
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
server.port=8081
|
server.port=8081
|
||||||
management.endpoints.web.expose=*
|
|
||||||
info.app.name=Spring Boot 2 actuator Application
|
|
||||||
|
|
||||||
logging.level.root=INFO
|
logging.level.root=INFO
|
Loading…
Reference in New Issue