基本测试API认证,WebApp 认证,CSRF模块
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 0a24848..6abc8d8 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,10 +1,5 @@
#######################################springboot配置 start#################################
# 单库数据库配置
-spring.datasource.url=jdbc:oracle:thin:@172.28.201.101:47922:orcl
-spring.datasource.username=dlpay
-spring.datasource.password=kingstar
-spring.datasource.driver.class=oracle.jdbc.driver.OracleDriver
-spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
spring.jpa.show-sql=true
spring.datasource.hikari.connection-timeout=60000
spring.datasource.hikari.maximum-pool-size=5
@@ -23,14 +18,3 @@
spring.thymeleaf.mode=HTML5
spring.thymeleaf.cache=false
spring.thymeleaf.enabled=true
-#################### Redis ####################
-# Redis settings
-redis.server=172.28.201.101
-redis.port=16379
-redis.password=kingstar
-redis.database=0
-#################### jwt ####################
-# jwt settings
-jwt.secret=Zj5taLomEbrM0lk+NMQZbHfSxaDU1wekjT+kiC3YzDw=
-jwt.expiration=3600
-jwt.header=payapi
\ No newline at end of file
diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html
index 4feb52a..919d862 100644
--- a/src/main/resources/templates/login.html
+++ b/src/main/resources/templates/login.html
@@ -1,12 +1,15 @@
<!DOCTYPE html>
+
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>用户登录</title>
+ <meta name="_csrf" th:content="${_csrf.token}" />
+ <!-- default header name is X-CSRF-TOKEN -->
+ <meta name="_csrf_header" th:content="${_csrf.headerName}" />
<link rel="stylesheet" type="text/css" th:href="@{/static/libs/layui/css/layui.css}" />
<link rel="stylesheet" type="text/css" th:href="@{/static/payapi/css/login.css}" />
</head>
-
<body>
<div class="login-wrapper">
@@ -25,6 +28,9 @@
<div class="layui-input-block">
<input name="username" type="text" lay-verify="required" placeholder="账号"
class="layui-input">
+ <input type="hidden"
+ th:name="${_csrf.parameterName}"
+ th:value="${_csrf.token}"/>
</div>
</div>
<div class="layui-form-item">