0

thymeleaf -> freemarker

This commit is contained in:
2022-04-17 17:29:15 +03:00
parent d1d3e5df18
commit fb86fa2e8a
14 changed files with 33 additions and 45 deletions

View File

@@ -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')

View File

@@ -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

View File

@@ -0,0 +1,2 @@
</body>
</html>

View File

@@ -7,6 +7,3 @@
<body>
<h1>Discord OAuth2 Example</h1>
<hr>
<p style="color: red">[TOP SECRET PAGE]</p>
</body>
</html>

View File

@@ -0,0 +1,7 @@
<#include "includes/header.ftlh">
<p>
Home public page<br>
---&gt; <a href="/secret">Secret Page</a> &lt;---<br>
[ <a href="/oauth2/authorization/discord">Login Discord</a> ]
</p>
<#include "includes/foother.ftlh">

View File

@@ -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>
---&gt; <a th:href="@{/secret}">Secret Page</a> &lt;---<br>
[ <a th:href="@{/oauth2/authorization/discord}">Login Discord</a> ]
</p>
</body>
</html>

View File

@@ -0,0 +1,3 @@
<#include "includes/header.ftlh">
<p style="color: red">[TOP SECRET PAGE]</p>
<#include "includes/foother.ftlh">