From: Kai Moritz Date: Mon, 1 Feb 2016 15:42:48 +0000 (+0100) Subject: Switched H2 to server-mode and made the console available in the app X-Git-Url: http://juplo.de/gitweb/?p=examples%2Ffacebook-app;a=commitdiff_plain;h=f629006c32b366b1bfaf24fb25f128f83e1c76b0 Switched H2 to server-mode and made the console available in the app --- diff --git a/pom.xml b/pom.xml index 30f0bca..510a4ff 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,9 @@ com.h2database h2 + + sa + diff --git a/src/main/java/de/juplo/yourshouter/WebSecurityConfig.java b/src/main/java/de/juplo/yourshouter/WebSecurityConfig.java index 2452adc..5b82a12 100644 --- a/src/main/java/de/juplo/yourshouter/WebSecurityConfig.java +++ b/src/main/java/de/juplo/yourshouter/WebSecurityConfig.java @@ -51,11 +51,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter http .csrf() /** - * The Facebook-Canvas does not send a proper CSRF-token in its - * POST-requests. Hence, this feature has to be disabled for all - * pages, that receive an initial call from the Facebook-Canvas. + * Neither the Facebook-Canvas nor the H2-console does send a proper + * CSRF-token in its POST-requests. Hence, this feature has to be + * disabled for this pages. */ - .ignoringAntMatchers("/canvas/*") + .ignoringAntMatchers("/canvas/*", "/h2-console/*") .and() .exceptionHandling() .authenticationEntryPoint(authenticationEntryPoint) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 91b0256..be5e940 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -12,7 +12,11 @@ httpclient.timeout.read=@httpclient.timeout.read@ spring.thymeleaf.prefix=/thymeleaf/ spring.thymeleaf.cache=false +spring.datasource.url=@jdbc.url@ +spring.datasource.username=@jdbc.username@ +spring.datasource.password=@jdbc.password@ spring.datasource.continueOnError=true +spring.h2.console.enabled=true logging.level.org.springframework.social=debug logging.level.org.apache.http=@httpclient.logging.level@ diff --git a/src/main/webapp/thymeleaf/home.html b/src/main/webapp/thymeleaf/home.html index b4d0074..f7649e5 100644 --- a/src/main/webapp/thymeleaf/home.html +++ b/src/main/webapp/thymeleaf/home.html @@ -8,6 +8,7 @@