health check
This commit is contained in:
parent
3000b111ec
commit
3b5cb79f7e
|
|
@ -42,6 +42,7 @@ dependencies {
|
|||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
|
||||
// ---- OpenAPI / Swagger UI ----
|
||||
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springdocVersion}"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ import org.springframework.web.cors.CorsConfiguration;
|
|||
import org.springframework.web.cors.CorsConfigurationSource;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
|
||||
import org.springframework.boot.actuate.health.HealthEndpoint;
|
||||
|
||||
//import static com.goi.erp.user.Permission.ADMIN_CREATE;
|
||||
//import static com.goi.erp.user.Permission.ADMIN_DELETE;
|
||||
//import static com.goi.erp.user.Permission.ADMIN_READ;
|
||||
|
|
@ -84,6 +87,7 @@ public class SecurityConfiguration {
|
|||
.csrf(AbstractHttpConfigurer::disable)
|
||||
.authorizeHttpRequests(req ->
|
||||
req.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
|
||||
.requestMatchers(EndpointRequest.to(HealthEndpoint.class)).permitAll()
|
||||
.requestMatchers("/auth/login", "/auth/token/refresh", "/auth/login/system").permitAll()
|
||||
.requestMatchers("/auth/logout").authenticated()
|
||||
.requestMatchers(WHITE_LIST_URL)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/${DB_NAME:goi}
|
||||
url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/${DB_NAME:goi}?currentSchema=${DB_SCHEMA}
|
||||
username: ${DB_USER}
|
||||
password: ${DB_PASSWORD}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
|
|
|
|||
Loading…
Reference in New Issue