From 7fc8dd678d92bd1be397add35a8d97f06153853b Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Mon, 12 Oct 2020 21:38:30 +0300 Subject: [PATCH] Dev props & Spring security: add actuator end point, formatting updates Signed-off-by: Pekka Helenius --- .../com/fjordtek/bookstore/config/WebSecurityConfig.java | 1 + bookstore/src/main/resources/application-dev.properties | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/config/WebSecurityConfig.java b/bookstore/src/main/java/com/fjordtek/bookstore/config/WebSecurityConfig.java index 98683f0..83f7d43 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/config/WebSecurityConfig.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/config/WebSecurityConfig.java @@ -130,6 +130,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .authorizeRequests() .antMatchers( env.getProperty("spring.h2.console.path") + "/**", + env.getProperty("page.url.statsref") + "/**", env.getProperty("page.url.index"), env.getProperty("page.url.list"), env.getProperty("page.url.error"), diff --git a/bookstore/src/main/resources/application-dev.properties b/bookstore/src/main/resources/application-dev.properties index 8c82b91..08968ef 100644 --- a/bookstore/src/main/resources/application-dev.properties +++ b/bookstore/src/main/resources/application-dev.properties @@ -8,4 +8,9 @@ spring.h2.console.enabled = true spring.h2.console.path = /h2-console spring.datasource.url = jdbc:h2:mem:testdb -spring.jpa.show-sql = true \ No newline at end of file +spring.jpa.show-sql = true + + + +management.endpoints.enabled-by-default = true +management.endpoints.web.exposure.include = * \ No newline at end of file