feat(framework): 添加Redis序列化白名单配置功能
This commit is contained in:
@@ -44,9 +44,9 @@ spring:
|
||||
data:
|
||||
redis:
|
||||
database: ${REDIS_DB:1}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:26379}
|
||||
password: ${REDIS_PWD:kd123456}
|
||||
host: ${REDIS_HOST:124.220.107.161}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PWD:?uWxt,CX2>+#*Ij@-xa+}
|
||||
# 连接超时时间
|
||||
timeout: 5000
|
||||
repositories:
|
||||
@@ -57,9 +57,9 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
# sql监控
|
||||
driverClassName: com.p6spy.engine.spy.P6SpyDriver
|
||||
url: jdbc:p6spy:mysql://127.0.0.1:23306/cutejava?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
|
||||
url: jdbc:p6spy:mysql://127.0.0.1:3306/cutejava?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
|
||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:23306/cutejava?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
|
||||
# url: jdbc:mysql://127.0.0.1:3306/cutejava?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: kd123456
|
||||
# 初始连接数,建议设置为与最小空闲连接数相同
|
||||
@@ -197,6 +197,13 @@ app:
|
||||
secretKey: 8BiK5UbmvXGJNVQ98CGiohHzT1N1FMRZqHRdJllj
|
||||
captcha:
|
||||
expireTime: 300
|
||||
# 序列化白名单
|
||||
serial-white-list:
|
||||
- "org.springframework"
|
||||
- "cn.odboy.system.dal.dataobject"
|
||||
- "cn.odboy.system.dal.model"
|
||||
- "cn.odboy.task.dal.dataobject"
|
||||
- "cn.odboy.task.dal.model"
|
||||
# debug
|
||||
#debug: true
|
||||
# 日志配置
|
||||
|
||||
@@ -206,6 +206,13 @@ app:
|
||||
secretKey: 8BiK5UbmvXGJNVQ98CGiohHzT1N1FMRZqHRdJllj
|
||||
captcha:
|
||||
expireTime: 300
|
||||
# 序列化白名单
|
||||
serial-white-list:
|
||||
- "org.springframework"
|
||||
- "cn.odboy.system.dal.dataobject"
|
||||
- "cn.odboy.system.dal.model"
|
||||
- "cn.odboy.task.dal.dataobject"
|
||||
- "cn.odboy.task.dal.model"
|
||||
# debug
|
||||
#debug: true
|
||||
# 日志配置
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<configuration scan="true" scanPeriod="30 seconds" debug="false">
|
||||
<contextName>CuteJava</contextName>
|
||||
<property name="log.name" value="cutejava"/>
|
||||
<property name="log.home" value="/Users/tianjun/Downloads/logs"/>
|
||||
<property name="log.home" value="/var/logs"/>
|
||||
<property name="log.charset" value="utf-8"/>
|
||||
<property name="log.pattern"
|
||||
value="%red(%contextName) - %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) - %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n"/>
|
||||
|
||||
+6
-8
@@ -16,19 +16,17 @@
|
||||
|
||||
package cn.odboy.util;
|
||||
|
||||
import static cn.odboy.util.KitStringUtil.getWeekDay;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import static cn.odboy.util.KitStringUtil.toCamelCase;
|
||||
import static cn.odboy.util.KitStringUtil.toCapitalizeCamelCase;
|
||||
import static cn.odboy.util.KitStringUtil.toUnderScoreCase;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
public class KitStringUtilTest {
|
||||
|
||||
@Test
|
||||
@@ -53,7 +51,7 @@ public class KitStringUtilTest {
|
||||
@Test
|
||||
public void testGetWeekDay() {
|
||||
SimpleDateFormat simpleDateformat = new SimpleDateFormat("E");
|
||||
assertEquals(simpleDateformat.format(new Date()), getWeekDay());
|
||||
assertEquals(simpleDateformat.format(new Date()), KitDateUtil.getWeekDay());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021-2026 Odboy
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.odboy.util;
|
||||
|
||||
/**
|
||||
* 钉钉 Teambition 实际工时数计算
|
||||
*/
|
||||
public class WorkTimeTests {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 总工作时长(时)
|
||||
double totalHour = 11;
|
||||
// 实际工作时长(天),一天8小时工作制
|
||||
double actualHour = totalHour / 8.0;
|
||||
System.err.println("actualHour=" + actualHour + " 天");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user