projects
/
examples
/
facebook-app
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9c82020
)
Switched H2 to server-mode and made the console available in the app
author
Kai Moritz
<kai@juplo.de>
Mon, 1 Feb 2016 15:42:48 +0000
(16:42 +0100)
committer
Kai Moritz
<kai@juplo.de>
Thu, 26 May 2016 13:51:27 +0000
(15:51 +0200)
pom.xml
patch
|
blob
|
history
src/main/java/de/juplo/yourshouter/WebSecurityConfig.java
patch
|
blob
|
history
src/main/resources/application.properties
patch
|
blob
|
history
src/main/webapp/thymeleaf/home.html
patch
|
blob
|
history
diff --git
a/pom.xml
b/pom.xml
index
30f0bca
..
510a4ff
100644
(file)
--- a/
pom.xml
+++ b/
pom.xml
@@
-36,6
+36,9
@@
<!-- database settings for tests -->
<jdbc.groupId>com.h2database</jdbc.groupId>
<jdbc.artifactId>h2</jdbc.artifactId>
<!-- database settings for tests -->
<jdbc.groupId>com.h2database</jdbc.groupId>
<jdbc.artifactId>h2</jdbc.artifactId>
+ <jdbc.url><![CDATA[jdbc:h2:~/test;DB_CLOSE_ON_EXIT=FALSE]]></jdbc.url>
+ <jdbc.username>sa</jdbc.username>
+ <jdbc.password></jdbc.password>
</properties>
<dependencies>
</properties>
<dependencies>
diff --git
a/src/main/java/de/juplo/yourshouter/WebSecurityConfig.java
b/src/main/java/de/juplo/yourshouter/WebSecurityConfig.java
index
2452adc
..
5b82a12
100644
(file)
--- 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()
/**
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-Canva
s.
+ *
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 page
s.
*/
*/
- .ignoringAntMatchers("/canvas/*")
+ .ignoringAntMatchers("/canvas/*"
, "/h2-console/*"
)
.and()
.exceptionHandling()
.authenticationEntryPoint(authenticationEntryPoint)
.and()
.exceptionHandling()
.authenticationEntryPoint(authenticationEntryPoint)
diff --git
a/src/main/resources/application.properties
b/src/main/resources/application.properties
index
91b0256
..
be5e940
100644
(file)
--- 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.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.datasource.continueOnError=true
+spring.h2.console.enabled=true
logging.level.org.springframework.social=debug
logging.level.org.apache.http=@httpclient.logging.level@
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
(file)
--- a/
src/main/webapp/thymeleaf/home.html
+++ b/
src/main/webapp/thymeleaf/home.html
@@
-8,6
+8,7
@@
<ul>
<li><a href="connect/facebookConnected.html" th:href="@{/connect/facebook.html}">Show connection-status</a></li>
<li><a href="profile.html" th:href="@{/profile.html}">Show public profile-data</a></li>
<ul>
<li><a href="connect/facebookConnected.html" th:href="@{/connect/facebook.html}">Show connection-status</a></li>
<li><a href="profile.html" th:href="@{/profile.html}">Show public profile-data</a></li>
+ <li><a href="#" th:href="@{/h2-console}">Connect to the H2-console</a></li>
</ul>
</body>
</html>
</ul>
</body>
</html>