From 8aac39be5da305b2557510fbc7505720db215bea Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Mon, 12 Oct 2020 23:31:29 +0300 Subject: [PATCH] Add development end points Signed-off-by: Pekka Helenius --- .../com/fjordtek/bookstore/config/WebSecurityConfig.java | 2 +- .../bookstore/service/session/BookStorePages.java | 8 ++++++++ bookstore/src/main/resources/website.properties | 7 +++++++ 3 files changed, 16 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 83f7d43..abe0c56 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/config/WebSecurityConfig.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/config/WebSecurityConfig.java @@ -130,7 +130,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .authorizeRequests() .antMatchers( env.getProperty("spring.h2.console.path") + "/**", - env.getProperty("page.url.statsref") + "/**", + env.getProperty("page.url.dev") + "/**", env.getProperty("page.url.index"), env.getProperty("page.url.list"), env.getProperty("page.url.error"), diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookStorePages.java b/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookStorePages.java index 967f98d..30822bb 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookStorePages.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookStorePages.java @@ -41,6 +41,9 @@ public class BookStorePages { JSON, JSONBOOK, JSONLIST, + ACTUATOR, + DEV, + DEVSTATSREF, H2CONSOLE, REST, RESTAUTHORS, @@ -71,6 +74,11 @@ public class BookStorePages { this.JSONBOOK = env.getProperty("page.url.json.book"); this.JSONLIST = env.getProperty("page.url.json.list"); + this.ACTUATOR = env.getProperty("page.url.actuator"); + + this.DEV = env.getProperty("page.url.dev"); + this.DEVSTATSREF = env.getProperty("page.url.dev.statsref"); + this.H2CONSOLE = env.getProperty("spring.h2.console.path"); this.REST = env.getProperty("spring.data.rest.base-path"); diff --git a/bookstore/src/main/resources/website.properties b/bookstore/src/main/resources/website.properties index 665c526..e9ace3e 100644 --- a/bookstore/src/main/resources/website.properties +++ b/bookstore/src/main/resources/website.properties @@ -24,8 +24,15 @@ page.url.apiref = /apiref page.url.autherror = /autherror page.url.error = /error + page.url.actuator = /actuator +# BookDevController +# Development only end points +# +page.url.dev = /dev +page.url.dev.statsref = /statsref + # BookRestController # Public JSON end points #