wip: 系统日志临时提交

This commit is contained in:
Ray.Hao
2024-06-24 22:15:12 +08:00
parent 7d1fcfbef4
commit bcf4248fdf
22 changed files with 168 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ package com.youlai.system.config;
import cn.hutool.captcha.generator.CodeGenerator;
import cn.hutool.captcha.generator.MathGenerator;
import cn.hutool.captcha.generator.RandomGenerator;
import com.youlai.system.plugin.captcha.CaptchaProperties;
import com.youlai.system.config.property.CaptchaProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -12,7 +12,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* mybatis-plus 配置类
* mybatis-plus 自动配置类
*
* @author haoxr
* @since 2022/7/2

View File

@@ -16,7 +16,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
/**
* Redis 缓存配置
*
* @author haoxr
* @author Ray
* @since 2023/12/4
*/
@EnableCaching

View File

@@ -9,7 +9,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
/**
* Redis 配置
*
* @author haoxr
* @author Ray
* @since 2023/5/15
*/
@Configuration

View File

@@ -29,7 +29,7 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
/**
* Spring Security 权限配置
*
* @author Ray Hao
* @author Ray
* @since 2023/2/17
*/
@Configuration

View File

@@ -17,7 +17,7 @@ import org.springframework.http.HttpHeaders;
* Swagger 配置
* <p>
*
* @author haoxr
* @author Ray
* @see <a href="https://doc.xiaominfo.com/docs/quick-start">knife4j 快速开始</a>
* @since 2023/2/17
*/

View File

@@ -23,6 +23,12 @@ import java.text.SimpleDateFormat;
import java.util.List;
import java.util.TimeZone;
/**
* WebMvc 自动装配配置
*
* @author Ray
* @since 2020/10/16
*/
@Configuration
@Slf4j
public class WebMvcConfig implements WebMvcConfigurer {

View File

@@ -0,0 +1,92 @@
package com.youlai.system.config.property;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 验证码 属性配置
*
* @author haoxr
* @since 2023/11/24
*/
@Component
@ConfigurationProperties(prefix = "captcha")
@Data
public class CaptchaProperties {
/**
* 验证码类型 circle-圆圈干扰验证码|gif-Gif验证码|line-干扰线验证码|shear-扭曲干扰验证码
*/
private String type;
/**
* 验证码图片宽度
*/
private int width;
/**
* 验证码图片高度
*/
private int height;
/**
* 干扰线数量
*/
private int interfereCount;
/**
* 文本透明度
*/
private Float textAlpha;
/**
* 验证码过期时间,单位:秒
*/
private Long expireSeconds;
/**
* 验证码字符配置
*/
private CodeProperties code;
/**
* 验证码字体
*/
private FontProperties font;
/**
* 验证码字符配置
*/
@Data
public static class CodeProperties {
/**
* 验证码字符类型 math-算术|random-随机字符串
*/
private String type;
/**
* 验证码字符长度type=算术时,表示运算位数(1:个位数 2:十位数)type=随机字符时,表示字符个数
*/
private int length;
}
/**
* 验证码字体配置
*/
@Data
public static class FontProperties {
/**
* 字体名称
*/
private String name;
/**
* 字体样式 0-普通|1-粗体|2-斜体
*/
private int weight;
/**
* 字体大小
*/
private int size;
}
}