thymeleaf -> freemarker
This commit is contained in:
@@ -14,7 +14,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation('org.springframework.boot:spring-boot-starter-web')
|
||||
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
|
||||
implementation('org.springframework.boot:spring-boot-starter-freemarker')
|
||||
|
||||
implementation('org.springframework.boot:spring-boot-starter-security')
|
||||
implementation('org.springframework.security:spring-security-oauth2-client')
|
||||
|
||||
@@ -5,10 +5,13 @@ server:
|
||||
debug: false
|
||||
|
||||
spring:
|
||||
freemarker:
|
||||
template-loader-path: classpath:/templates
|
||||
suffix: .ftlh
|
||||
security:
|
||||
oauth2:
|
||||
client:
|
||||
registration:
|
||||
discord:
|
||||
client-id: 965013316982423632
|
||||
client-secret: yhb13RP26WxfOru9fcQ6CxPcAUWr_2q6
|
||||
client-secret: yhb13RP26WxfOru9fcQ6CxPcAUWr_2q6
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,6 +7,3 @@
|
||||
<body>
|
||||
<h1>Discord OAuth2 Example</h1>
|
||||
<hr>
|
||||
<p style="color: red">[TOP SECRET PAGE]</p>
|
||||
</body>
|
||||
</html>
|
||||
7
discord/src/main/resources/templates/index.ftlh
Normal file
7
discord/src/main/resources/templates/index.ftlh
Normal file
@@ -0,0 +1,7 @@
|
||||
<#include "includes/header.ftlh">
|
||||
<p>
|
||||
Home public page<br>
|
||||
---> <a href="/secret">Secret Page</a> <---<br>
|
||||
[ <a href="/oauth2/authorization/discord">Login Discord</a> ]
|
||||
</p>
|
||||
<#include "includes/foother.ftlh">
|
||||
@@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="https://www.thymeleaf.org">
|
||||
<head>
|
||||
<title>Discord OAuth2 Example</title>
|
||||
<link rel="icon" href="data:;base64,=">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Discord OAuth2 Example</h1>
|
||||
<hr>
|
||||
<p>
|
||||
Home public page<br>
|
||||
---> <a th:href="@{/secret}">Secret Page</a> <---<br>
|
||||
[ <a th:href="@{/oauth2/authorization/discord}">Login Discord</a> ]
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
3
discord/src/main/resources/templates/secret.ftlh
Normal file
3
discord/src/main/resources/templates/secret.ftlh
Normal file
@@ -0,0 +1,3 @@
|
||||
<#include "includes/header.ftlh">
|
||||
<p style="color: red">[TOP SECRET PAGE]</p>
|
||||
<#include "includes/foother.ftlh">
|
||||
@@ -14,7 +14,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation('org.springframework.boot:spring-boot-starter-web')
|
||||
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
|
||||
implementation('org.springframework.boot:spring-boot-starter-freemarker')
|
||||
|
||||
implementation('org.springframework.boot:spring-boot-starter-security')
|
||||
implementation('org.springframework.security:spring-security-oauth2-client')
|
||||
|
||||
@@ -5,6 +5,9 @@ server:
|
||||
debug: false
|
||||
|
||||
spring:
|
||||
freemarker:
|
||||
template-loader-path: classpath:/templates
|
||||
suffix: .ftlh
|
||||
security:
|
||||
oauth2:
|
||||
client:
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,6 +7,3 @@
|
||||
<body>
|
||||
<h1>GitHub OAuth2 Example</h1>
|
||||
<hr>
|
||||
<p style="color: red">[TOP SECRET PAGE]</p>
|
||||
</body>
|
||||
</html>
|
||||
7
github/src/main/resources/templates/index.ftlh
Normal file
7
github/src/main/resources/templates/index.ftlh
Normal file
@@ -0,0 +1,7 @@
|
||||
<#include "includes/header.ftlh">
|
||||
<p>
|
||||
Home public page<br>
|
||||
---> <a href="/secret">Secret Page</a> <---<br>
|
||||
[ <a href="/oauth2/authorization/github">Login GitHub</a> ]
|
||||
</p>
|
||||
<#include "includes/foother.ftlh">
|
||||
@@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="https://www.thymeleaf.org">
|
||||
<head>
|
||||
<title>GitHub OAuth2 Example</title>
|
||||
<link rel="icon" href="data:;base64,=">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GitHub OAuth2 Example</h1>
|
||||
<hr>
|
||||
<p>
|
||||
Home public page<br>
|
||||
---> <a th:href="@{/secret}">Secret Page</a> <---<br>
|
||||
[ <a th:href="@{/oauth2/authorization/github}">Login GitHub</a> ]
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
3
github/src/main/resources/templates/secret.ftlh
Normal file
3
github/src/main/resources/templates/secret.ftlh
Normal file
@@ -0,0 +1,3 @@
|
||||
<#include "includes/header.ftlh">
|
||||
<p style="color: red">[TOP SECRET PAGE]</p>
|
||||
<#include "includes/foother.ftlh">
|
||||
Reference in New Issue
Block a user