配置Redis和Mybatis-Plus

This commit is contained in:
Bunny 2024-05-03 16:55:03 +08:00
parent 72ff5d0d8d
commit 0ad5d02b63
55 changed files with 2256 additions and 89 deletions

View File

@ -1,11 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>cn.bunny</groupId> <groupId>cn.bunny</groupId>
<artifactId>java-template</artifactId> <artifactId>bunny-template</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<artifactId>common</artifactId> <artifactId>common</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>common Maven Webapp</name> <name>common Maven Webapp</name>
@ -15,7 +16,12 @@
<module>common-utils</module> <module>common-utils</module>
<module>spring-security</module> <module>spring-security</module>
</modules> </modules>
<dependencies>
<dependencies>
<!-- minio -->
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -9,7 +9,6 @@
<artifactId>service-utils</artifactId> <artifactId>service-utils</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>service-utils</name> <name>service-utils</name>
<url>https://maven.apache.org</url> <url>https://maven.apache.org</url>
@ -39,12 +38,6 @@
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<!--mybatis-plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<scope>provided</scope>
</dependency>
<!-- mysql连接池 --> <!-- mysql连接池 -->
<dependency> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>

View File

@ -6,19 +6,21 @@ import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerIntercep
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* Mybatis-Plus配置类
*/
@EnableTransactionManagement @EnableTransactionManagement
@MapperScan("cn.bunny.service.mapper") // @MapperScan("cn.bunny.service.mapper")
@Configuration @Configuration
@Slf4j @Slf4j
public class MybatisPlusConfig { public class MybatisPlusConfig {
@Bean @Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() { public MybatisPlusInterceptor mybatisPlusInterceptor() {
log.info("注入Mybatis-Plus配置..."); log.info("MybatisPlusInterceptor===>注入Mybatis-Plus配置...");
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 分页插件 // 分页插件

View File

@ -0,0 +1,100 @@
package cn.bunny.common.service.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/**
* 设置Redis序列化
*/
@Component
@Slf4j
public class RedisConfiguration {
/**
* 使用StringRedisSerializer序列化为字符串
*/
@Bean
public RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory connectionFactory) {
log.info("RedisConfiguration===>使用StringRedisSerializer序列化为字符串");
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(connectionFactory);
// 设置key序列化为string
redisTemplate.setKeySerializer(new StringRedisSerializer());
// 设置value序列化为JSON使用GenericJackson2JsonRedisSerializer替换默认序列化
redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer());
return redisTemplate;
}
/**
* 解决cache(@Cacheable)把数据缓存到redis中的value是乱码问题
*/
@Bean
@SuppressWarnings("all")
public CacheManager cacheManager(RedisConnectionFactory factory) {
log.info("RedisConfiguration===>解决cache(@Cacheable)把数据缓存到redis中的value是乱码问题");
// 配置序列化
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig();
config.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jsonRedisSerializer()))
.entryTtl(Duration.ofDays(365));
RedisCacheManager cacheManager = RedisCacheManager.builder(factory)
.cacheDefaults(config).build();
return cacheManager;
}
/**
* 指定的日期模式
*/
public Jackson2JsonRedisSerializer<Object> jsonRedisSerializer() {
log.info("RedisConfiguration===>指定的日期模式");
ObjectMapper mapper = new ObjectMapper();
// 设置ObjectMapper访问权限
mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
// 记录序列化之后的数据类型方便反序列化
mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL);
// LocalDatetime序列化默认不兼容jdk8日期序列化
JavaTimeModule timeModule = new JavaTimeModule();
timeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
timeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
timeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
timeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
// 关闭默认的日期格式化方式默认UTC日期格式 yyyy-MM-ddTHH:mm:ss.SSS
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
mapper.registerModule(timeModule);
return new Jackson2JsonRedisSerializer<>(mapper, Object.class);
}
}

View File

@ -0,0 +1,35 @@
package cn.bunny.common.service.constant;
/**
* 信息提示常量类
*/
public class MessageConstant {
public static final String PASSWORD_ERROR = "密码错误";
public static final String OLD_PASSWORD_ERROR = "旧密码不匹配";
public static final String OLD_PASSWORD_SAME_NEW_PASSWORD = "旧密码与新密码相同";
public static final String ACCOUNT_NOT_FOUND = "账号不存在";
public static final String ACCOUNT_LOCKED = "账号被锁定";
public static final String UNKNOWN_ERROR = "未知错误";
public static final String USER_NOT_LOGIN = "用户未登录";
public static final String USER_TOKEN_OUT_OF_DATE = "用户登录过期";
public static final String LOGIN_FAILED = "登录失败";
public static final String UPLOAD_FAILED = "文件上传失败";
public static final String PASSWORD_EDIT_FAILED = "密码修改失败";
public static final String ALREADY_EXISTS = "已存在";
public static final String REQUEST_NOT_EMPTY = "请求不为空";
public static final String UPDATE_ID_IS_NOT_EMPTY = "删除id不能为空";
public static final String DELETE_ID_IS_NOT_EMPTY = "修改id不能为空";
public static final String MENU_IS_NOT_EXIST = "菜单不存在";
public static final String SAVE_DTO_IS_NULL = "添加参数不能为空";
public static final String UPDATE_DTO_IS_NULL = "修改参数不能为空";
public static final String FIND_ID_IS_NOT_EMPTY = "查询ID不能为空";
public static final String MESSAGE_CODE_NOT_PASS = "短信验证码未过期";
public static final String MESSAGE_CODE_UNAUTHORIZED = "短信验证码未授权,请联系管理员";
public static final String VERIFICATION_CODE_ERROR = "验证码错误";
public static final String USER_DOES_NOT_EXIST = "用户不存在";
public static final String USER_DOES_IS_EXIST = "用户已存在";
public static final String VERIFICATION_CODE_IS_EMPTY = "请先发送验证码";
public static final String LOGIN_DTO_IS_EMPTY = "登录参数不能为空";
public static final String TOKEN_IS_EMPTY = "token为空";
public static final String DATA_IS_EMPTY = "数据为空";
}

View File

@ -0,0 +1,33 @@
package cn.bunny.common.service.context;
public class BaseContext {
private static final ThreadLocal<Long> userId = new ThreadLocal<>();
private static final ThreadLocal<Long> wareId = new ThreadLocal<>();
private static final ThreadLocal<Long> adminId = new ThreadLocal<>();
// 用户id相关
public static Long getUserId() {
return userId.get();
}
public static void setUserId(Long _userId) {
userId.set(_userId);
}
public static void removeUserId() {
userId.remove();
}
// adminId 相关
public static Long getAdminId() {
return adminId.get();
}
public static void setAdminId(Long _adminId) {
adminId.set(_adminId);
}
public static void removeAdminId() {
adminId.remove();
}
}

View File

@ -0,0 +1,33 @@
package cn.bunny.common.service.exception;
import cn.bunny.enums.ResultCodeEnum;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
@NoArgsConstructor
@Getter
@ToString
@Slf4j
public class BunnyException extends RuntimeException {
Integer code;// 状态码
String message;// 描述信息
public BunnyException(Integer code, String message) {
super(message);
this.code = code;
this.message = message;
}
public BunnyException(String message) {
super(message);
this.message = message;
}
public BunnyException(ResultCodeEnum codeEnum) {
super(codeEnum.getMessage());
this.code = codeEnum.getCode();
this.message = codeEnum.getMessage();
}
}

View File

@ -0,0 +1,81 @@
package cn.bunny.common.service.exception;
import cn.bunny.common.service.constant.MessageConstant;
import cn.bunny.common.service.result.Result;
import cn.bunny.enums.ResultCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import java.io.FileNotFoundException;
import java.nio.file.AccessDeniedException;
import java.sql.SQLIntegrityConstraintViolationException;
@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {
// 自定义异常信息
@ExceptionHandler(BunnyException.class)
@ResponseBody
public Result<Object> exceptionHandler(BunnyException exception) {
log.error("GlobalExceptionHandler===>自定义异常信息:{}", exception.getMessage());
Integer code = exception.getCode() != null ? exception.getCode() : 500;
return Result.error(null, code, exception.getMessage());
}
// 运行时异常信息
@ExceptionHandler(RuntimeException.class)
@ResponseBody
public Result<Object> exceptionHandler(RuntimeException exception) throws FileNotFoundException {
log.error("GlobalExceptionHandler===>运行时异常信息:{}", exception.getMessage());
exception.printStackTrace();
return Result.error(null, 500, "出错了啦");
}
// 捕获系统异常
@ExceptionHandler(Exception.class)
@ResponseBody
public Result<Object> error(Exception exception) {
log.error("GlobalExceptionHandler===>系统异常信息:{}", exception.getMessage());
return Result.error(null, 500, "系统异常");
}
// 特定异常处理
@ExceptionHandler(ArithmeticException.class)
@ResponseBody
public Result<Object> error(ArithmeticException exception) {
log.error("GlobalExceptionHandler===>特定异常信息:{}", exception.getMessage());
return Result.error(null, 500, exception.getMessage());
}
// spring security异常
@ExceptionHandler(AccessDeniedException.class)
@ResponseBody
public Result<String> error(AccessDeniedException exception) throws AccessDeniedException {
log.error("GlobalExceptionHandler===>spring security异常{}", exception.getMessage());
return Result.error(ResultCodeEnum.PERMISSION);
}
// 处理SQL异常
@ExceptionHandler(SQLIntegrityConstraintViolationException.class)
@ResponseBody
public Result<String> exceptionHandler(SQLIntegrityConstraintViolationException exception) {
log.error("GlobalExceptionHandler===>处理SQL异常:{}", exception.getMessage());
String message = exception.getMessage();
if (message.contains("Duplicate entry")) {
// 截取用户名
String username = message.split(" ")[2];
// 错误信息
String errorMessage = username + MessageConstant.ALREADY_EXISTS;
return Result.error(errorMessage);
} else {
return Result.error(MessageConstant.UNKNOWN_ERROR);
}
}
}

View File

@ -0,0 +1,27 @@
package cn.bunny.common.service.properties;
import io.minio.MinioClient;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConfigurationProperties(prefix = "bunny.minio")
@ConditionalOnProperty(name = "bunny.minio.bucket-name")// 当属性有值时这个配置才生效
@Data
@Slf4j
public class MinioProperties {
private String endpointUrl;
private String accessKey;
private String secretKey;
private String bucketName;
@Bean
public MinioClient minioClient() {
log.info("注册MinioClient...");
return MinioClient.builder().endpoint(endpointUrl).credentials(accessKey, secretKey).build();
}
}

View File

@ -0,0 +1,175 @@
package cn.bunny.common.service.result;
import cn.bunny.enums.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
// 状态码
private Integer code;
// 返回消息
private String message;
// 返回数据
private T data;
/**
* * 自定义返回体
*
* @param data 返回体
* @return Result<T>
*/
protected static <T> Result<T> build(T data) {
Result<T> result = new Result<>();
if (data != null) {
result.setData(data);
}
return result;
}
/**
* * 自定义返回体使用ResultCodeEnum构建
*
* @param body 返回体
* @param codeEnum 返回状态码
* @return Result<T>
*/
public static <T> Result<T> build(T body, ResultCodeEnum codeEnum) {
Result<T> result = build(body);
result.setCode(codeEnum.getCode());
result.setMessage(codeEnum.getMessage());
return result;
}
/**
* * 自定义返回体
*
* @param body 返回体
* @param code 返回状态码
* @param message 返回消息
* @return Result<T>
*/
public static <T> Result<T> build(T body, Integer code, String message) {
Result<T> result = build(body);
result.setCode(code);
result.setMessage(message);
return result;
}
/**
* * 操作成功
*
* @return Result<T>
*/
public static <T> Result<T> success() {
return Result.success(null, ResultCodeEnum.SUCCESS);
}
/**
* * 操作成功
*
* @param data baseCategory1List
*/
public static <T> Result<T> success(T data) {
return build(data, ResultCodeEnum.SUCCESS);
}
/**
* * 操作成功-状态码
*
* @param codeEnum 状态码
*/
public static <T> Result<T> success(ResultCodeEnum codeEnum) {
return success(null, codeEnum);
}
/**
* * 操作成功-自定义返回数据和状态码
*
* @param data 返回体
* @param codeEnum 状态码
*/
public static <T> Result<T> success(T data, ResultCodeEnum codeEnum) {
return build(data, codeEnum);
}
/**
* * 操作失败-自定义返回数据和状态码
*
* @param data 返回体
* @param message 错误信息
*/
public static <T> Result<T> success(T data, String message) {
return build(data, 200, message);
}
/**
* * 操作失败-自定义返回数据和状态码
*
* @param data 返回体
* @param code 状态码
* @param message 错误信息
*/
public static <T> Result<T> success(T data, Integer code, String message) {
return build(data, code, message);
}
/**
* * 操作失败
*/
public static <T> Result<T> error() {
return Result.build(null);
}
/**
* * 操作失败-自定义返回数据
*
* @param data 返回体
*/
public static <T> Result<T> error(T data) {
return build(data, ResultCodeEnum.FAIL);
}
/**
* * 操作失败-状态码
*
* @param codeEnum 状态码
*/
public static <T> Result<T> error(ResultCodeEnum codeEnum) {
return build(null, codeEnum);
}
/**
* * 操作失败-自定义返回数据和状态码
*
* @param data 返回体
* @param codeEnum 状态码
*/
public static <T> Result<T> error(T data, ResultCodeEnum codeEnum) {
return build(data, codeEnum);
}
/**
* * 操作失败-自定义返回数据和状态码
*
* @param data 返回体
* @param code 状态码
* @param message 错误信息
*/
public static <T> Result<T> error(T data, Integer code, String message) {
return build(data, code, message);
}
/**
* * 操作失败-自定义返回数据和状态码
*
* @param data 返回体
* @param message 错误信息
*/
public static <T> Result<T> error(T data, String message) {
return build(null, 500, message);
}
}

View File

@ -1,19 +1,556 @@
22:13:48:146 INFO 6108 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 6108 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template) 00:00:20:860 INFO 19084 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 19084 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
22:13:48:146 INFO 6108 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev" 00:00:20:865 INFO 19084 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
22:13:48:409 INFO 6108 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode 00:00:21:211 INFO 19084 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
22:13:48:410 INFO 6108 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode. 00:00:21:212 INFO 19084 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
22:13:48:423 INFO 6108 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 Redis repository interfaces. 00:00:21:226 INFO 19084 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
22:13:48:630 INFO 6108 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http) 00:00:21:585 INFO 19084 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http)
22:13:48:635 INFO 6108 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 00:00:21:591 INFO 19084 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
22:13:48:635 INFO 6108 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.20] 00:00:21:592 INFO 19084 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.16]
22:13:48:664 INFO 6108 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 00:00:21:633 INFO 19084 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
22:13:48:664 INFO 6108 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 497 ms 00:00:21:633 INFO 19084 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 745 ms
22:13:49:073 WARN 6108 --- [bunny-service] [main] .s.s.UserDetailsServiceAutoConfiguration : 00:00:21:679 WARN 19084 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
00:00:21:681 INFO 19084 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
00:00:21:688 INFO 19084 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Using generated security password: 8d911c70-0398-4b8f-b5e7-b50ff6bc614e Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
00:00:21:696 ERROR 19084 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:946) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 20 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1775) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 34 common frames omitted
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.util.Assert.notNull(Assert.java:172) ~[spring-core-6.1.1.jar:6.1.1]
at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:122) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771) ~[spring-beans-6.1.1.jar:6.1.1]
... 44 common frames omitted
00:00:36:127 INFO 19572 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 19572 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
00:00:36:129 INFO 19572 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
00:00:36:457 INFO 19572 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
00:00:36:458 INFO 19572 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
00:00:36:473 INFO 19572 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
00:00:36:823 INFO 19572 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http)
00:00:36:828 INFO 19572 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
00:00:36:828 INFO 19572 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.16]
00:00:36:857 INFO 19572 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
00:00:36:857 INFO 19572 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 706 ms
00:00:36:893 WARN 19572 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
00:00:36:893 INFO 19572 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
00:00:36:907 INFO 19572 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
00:00:36:918 ERROR 19572 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:946) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 20 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1775) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 34 common frames omitted
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.util.Assert.notNull(Assert.java:172) ~[spring-core-6.1.1.jar:6.1.1]
at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:122) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771) ~[spring-beans-6.1.1.jar:6.1.1]
... 44 common frames omitted
00:01:49:361 INFO 20456 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 20456 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
00:01:49:362 INFO 20456 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
00:01:49:704 INFO 20456 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
00:01:49:706 INFO 20456 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
00:01:49:720 INFO 20456 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
00:01:50:124 INFO 20456 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http)
00:01:50:130 INFO 20456 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
00:01:50:130 INFO 20456 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.16]
00:01:50:162 INFO 20456 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
00:01:50:162 INFO 20456 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 777 ms
00:01:50:203 WARN 20456 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
00:01:50:204 INFO 20456 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
00:01:50:216 INFO 20456 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
00:01:50:230 ERROR 20456 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:946) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 20 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1775) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 34 common frames omitted
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.util.Assert.notNull(Assert.java:172) ~[spring-core-6.1.1.jar:6.1.1]
at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:122) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771) ~[spring-beans-6.1.1.jar:6.1.1]
... 44 common frames omitted
00:02:35:129 INFO 8688 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 8688 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
00:02:35:130 INFO 8688 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
00:02:35:458 INFO 8688 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
00:02:35:459 INFO 8688 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
00:02:35:475 INFO 8688 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
00:02:35:824 INFO 8688 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http)
00:02:35:828 INFO 8688 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
00:02:35:828 INFO 8688 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.16]
00:02:35:859 INFO 8688 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
00:02:35:859 INFO 8688 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 705 ms
00:02:35:894 WARN 8688 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
00:02:35:897 INFO 8688 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
00:02:35:908 INFO 8688 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
00:02:35:918 ERROR 8688 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexController': Unsatisfied dependency expressed through field 'sysUserService': Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:946) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysUserServiceImpl': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:772) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:752) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:493) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 20 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in file [G:\web项目\Bunny-Cli\Java\java-template\service\target\classes\cn\bunny\service\mapper\SysUserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1775) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1441) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1348) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:769) ~[spring-beans-6.1.1.jar:6.1.1]
... 34 common frames omitted
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
at org.springframework.util.Assert.notNull(Assert.java:172) ~[spring-core-6.1.1.jar:6.1.1]
at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:122) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-2.0.5.jar:2.0.5]
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771) ~[spring-beans-6.1.1.jar:6.1.1]
... 44 common frames omitted
10:28:24:507 INFO 25976 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 25976 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
10:28:24:508 INFO 25976 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
10:28:24:900 INFO 25976 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
10:28:24:902 INFO 25976 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
10:28:24:920 INFO 25976 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
10:28:24:985 WARN 25976 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
10:28:24:990 INFO 25976 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
10:28:25:001 ERROR 25976 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:838) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:620) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:573) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:532) ~[spring-beans-6.1.1.jar:6.1.1]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:775) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:597) ~[spring-context-6.1.1.jar:6.1.1]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) ~[spring-boot-3.2.0.jar:3.2.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) ~[spring-boot-3.2.0.jar:3.2.0]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
10:30:14:630 INFO 23272 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 23272 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
10:30:14:631 INFO 23272 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
10:30:15:035 INFO 23272 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
10:30:15:037 INFO 23272 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
10:30:15:057 INFO 23272 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 9 ms. Found 0 Redis repository interfaces.
10:30:15:129 WARN 23272 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
10:30:15:134 INFO 23272 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
10:30:15:146 ERROR 23272 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:652) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:575) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
10:31:00:865 INFO 18296 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 18296 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
10:31:00:865 INFO 18296 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
10:31:01:191 INFO 18296 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
10:31:01:192 INFO 18296 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
10:31:01:207 INFO 18296 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
10:31:01:269 WARN 18296 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
10:31:01:273 INFO 18296 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
10:31:01:282 ERROR 18296 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:652) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:575) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
10:33:54:613 INFO 20704 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 20704 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
10:33:54:615 INFO 20704 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
10:33:54:976 INFO 20704 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
10:33:54:977 INFO 20704 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
10:33:54:992 INFO 20704 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
10:33:55:433 INFO 20704 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http)
10:33:55:441 INFO 20704 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
10:33:55:441 INFO 20704 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.20]
10:33:55:485 INFO 20704 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
10:33:55:485 INFO 20704 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 847 ms
10:34:01:041 INFO 20704 --- [bunny-service] [main] c.b.c.service.config.MybatisPlusConfig : MybatisPlusInterceptor===>注入Mybatis-Plus配置...
10:34:01:399 INFO 20704 --- [bunny-service] [main] c.b.c.service.config.RedisConfiguration : RedisConfiguration===>使用StringRedisSerializer序列化为字符串
10:34:01:452 INFO 20704 --- [bunny-service] [main] c.b.c.service.config.RedisConfiguration : RedisConfiguration===>解决cache(@Cacheable)把数据缓存到redis中的value是乱码问题
10:34:01:455 INFO 20704 --- [bunny-service] [main] c.b.c.service.config.RedisConfiguration : RedisConfiguration===>指定的日期模式
10:34:03:213 INFO 20704 --- [bunny-service] [main] c.b.c.s.properties.MinioProperties : 注册MinioClient...
10:34:03:617 WARN 20704 --- [bunny-service] [main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: 68d1aef6-1989-4d21-b0ac-14061cdc8845
This generated password is for development use only. Your security configuration must be updated before running your application in production. This generated password is for development use only. Your security configuration must be updated before running your application in production.
22:13:49:116 INFO 6108 --- [bunny-service] [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@2acb1264, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@30a01dd8, org.springframework.security.web.context.SecurityContextHolderFilter@1c8e8fed, org.springframework.security.web.header.HeaderWriterFilter@17df689e, org.springframework.web.filter.CorsFilter@1f68e4e8, org.springframework.security.web.csrf.CsrfFilter@78f5cbc5, org.springframework.security.web.authentication.logout.LogoutFilter@3cad24ae, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@2f6e92ca, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@1e8bccfb, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@47b4ac83, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@56299b0e, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@713e7d9a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@681d704e, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@351ede23, org.springframework.security.web.access.ExceptionTranslationFilter@5d58dc61, org.springframework.security.web.access.intercept.AuthorizationFilter@6b7c4734] 10:34:03:689 INFO 20704 --- [bunny-service] [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@70273633, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1f641fb7, org.springframework.security.web.context.SecurityContextHolderFilter@131c5bd, org.springframework.security.web.header.HeaderWriterFilter@4a7e469d, org.springframework.web.filter.CorsFilter@69dc7b24, org.springframework.security.web.csrf.CsrfFilter@1b3a95d9, org.springframework.security.web.authentication.logout.LogoutFilter@642d34f1, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@69d61a6f, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@7272914b, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@297454f7, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@4db4431b, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2627335c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@5470753a, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@602b7944, org.springframework.security.web.access.ExceptionTranslationFilter@129e45eb, org.springframework.security.web.access.intercept.AuthorizationFilter@408d12fc]
22:13:49:145 INFO 6108 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8800 (http) with context path '' 10:34:03:728 INFO 20704 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8800 (http) with context path ''
22:13:49:149 INFO 6108 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Started ServiceApplication in 1.229 seconds (process running for 1.545) 10:34:03:733 INFO 20704 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Started ServiceApplication in 9.361 seconds (process running for 14.509)
16:49:14:454 INFO 20792 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 20792 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
16:49:14:455 INFO 20792 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
16:49:14:790 INFO 20792 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
16:49:14:791 INFO 20792 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
16:49:14:806 INFO 20792 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
16:49:14:864 WARN 20792 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
16:49:14:869 INFO 20792 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
16:49:14:878 ERROR 20792 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:652) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:575) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
16:51:53:068 INFO 22660 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 22660 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
16:51:53:070 INFO 22660 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
16:51:53:410 INFO 22660 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
16:51:53:411 INFO 22660 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
16:51:53:425 INFO 22660 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 Redis repository interfaces.
16:51:53:510 WARN 22660 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
16:51:53:516 INFO 22660 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
16:51:53:526 ERROR 22660 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:652) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:575) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
16:52:41:386 INFO 11552 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 11552 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
16:52:41:387 INFO 11552 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
16:52:41:740 INFO 11552 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
16:52:41:741 INFO 11552 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
16:52:41:756 INFO 11552 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 Redis repository interfaces.
16:52:41:817 WARN 11552 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
16:52:41:822 INFO 11552 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
16:52:41:833 ERROR 11552 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:652) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:575) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
16:52:51:515 INFO 21396 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 21396 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
16:52:51:516 INFO 21396 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
16:52:51:849 INFO 21396 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
16:52:51:851 INFO 21396 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
16:52:51:864 INFO 21396 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 Redis repository interfaces.
16:52:51:923 WARN 21396 --- [bunny-service] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
16:52:51:928 INFO 21396 --- [bunny-service] [main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
16:52:51:939 ERROR 21396 --- [bunny-service] [main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:837) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:652) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:575) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534) ~[spring-beans-6.1.6.jar:6.1.6]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
at cn.bunny.service.ServiceApplication.main(ServiceApplication.java:13) ~[classes/:na]
16:54:31:130 INFO 18584 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Starting ServiceApplication using Java 21.0.2 with PID 18584 (G:\web项目\Bunny-Cli\Java\java-template\service\target\classes started by 13199 in G:\web项目\Bunny-Cli\Java\java-template)
16:54:31:131 INFO 18584 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : The following 1 profile is active: "dev"
16:54:31:464 INFO 18584 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
16:54:31:465 INFO 18584 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
16:54:31:479 INFO 18584 --- [bunny-service] [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 Redis repository interfaces.
16:54:31:810 INFO 18584 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8800 (http)
16:54:31:816 INFO 18584 --- [bunny-service] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
16:54:31:816 INFO 18584 --- [bunny-service] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.20]
16:54:31:852 INFO 18584 --- [bunny-service] [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
16:54:31:852 INFO 18584 --- [bunny-service] [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 699 ms
16:54:31:902 INFO 18584 --- [bunny-service] [main] c.b.c.service.config.MybatisPlusConfig : MybatisPlusInterceptor===>注入Mybatis-Plus配置...
16:54:32:160 INFO 18584 --- [bunny-service] [main] c.b.c.service.config.RedisConfiguration : RedisConfiguration===>使用StringRedisSerializer序列化为字符串
16:54:32:197 INFO 18584 --- [bunny-service] [main] c.b.c.service.config.RedisConfiguration : RedisConfiguration===>解决cache(@Cacheable)把数据缓存到redis中的value是乱码问题
16:54:32:200 INFO 18584 --- [bunny-service] [main] c.b.c.service.config.RedisConfiguration : RedisConfiguration===>指定的日期模式
16:54:32:205 INFO 18584 --- [bunny-service] [main] c.b.c.s.properties.MinioProperties : 注册MinioClient...
16:54:32:520 WARN 18584 --- [bunny-service] [main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: 39f64e4f-f4d5-4aff-8d24-329a6c758040
This generated password is for development use only. Your security configuration must be updated before running your application in production.
16:54:32:575 INFO 18584 --- [bunny-service] [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@39159b14, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@57ab4b33, org.springframework.security.web.context.SecurityContextHolderFilter@3ebc6d8b, org.springframework.security.web.header.HeaderWriterFilter@1fe7fa16, org.springframework.web.filter.CorsFilter@43b2e7db, org.springframework.security.web.csrf.CsrfFilter@1774c4e2, org.springframework.security.web.authentication.logout.LogoutFilter@6f25ed2b, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@31940d6b, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@54ef9698, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@46d51d5e, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@2ae88712, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@7e7391e8, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1fa44f66, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@530df3ab, org.springframework.security.web.access.ExceptionTranslationFilter@169d1f92, org.springframework.security.web.access.intercept.AuthorizationFilter@59043741]
16:54:32:608 INFO 18584 --- [bunny-service] [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8800 (http) with context path ''
16:54:32:614 INFO 18584 --- [bunny-service] [main] cn.bunny.service.ServiceApplication : Started ServiceApplication in 1.72 seconds (process running for 2.04)

Binary file not shown.

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>cn.bunny</groupId> <groupId>cn.bunny</groupId>
<artifactId>java-template</artifactId> <artifactId>bunny-template</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
@ -26,6 +26,15 @@
<groupId>com.alibaba.fastjson2</groupId> <groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId> <artifactId>fastjson2</artifactId>
</dependency> </dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId> <artifactId>spring-boot-starter-security</artifactId>

View File

@ -0,0 +1,32 @@
package cn.bunny.entity.base;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Data
public class BaseEntity implements Serializable {
@TableId(type = IdType.AUTO)
private Long id;
@TableField("create_time")
private Date createTime;
@TableField("update_time")
private Date updateTime;
@TableLogic
@TableField("is_deleted")
private Integer isDeleted;
@TableField(exist = false)
private Map<String, Object> param = new HashMap<>();
}

View File

@ -0,0 +1,14 @@
package cn.bunny.entity.system;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Login {
private String token;
}

View File

@ -0,0 +1,17 @@
package cn.bunny.entity.system;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RoleByUser {
private List<SysRole> assginRoleList;
private List<SysRole> allRolesList;
}

View File

@ -0,0 +1,51 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(description = "部门")
@TableName("sys_dept")
public class SysDept extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "部门名称")
@TableField("name")
private String name;
@ApiModelProperty(value = "上级部门id")
@TableField("parent_id")
private Long parentId;
@ApiModelProperty(value = "树结构")
@TableField("tree_path")
private String treePath;
@ApiModelProperty(value = "排序")
@TableField("sort_value")
private Integer sortValue;
@ApiModelProperty(value = "负责人")
@TableField("leader")
private String leader;
@ApiModelProperty(value = "电话")
@TableField("phone")
private String phone;
@ApiModelProperty(value = "状态1正常 0停用")
@TableField("status")
private Integer status;
@ApiModelProperty(value = "下级部门")
@TableField(exist = false)
private List<SysDept> children;
}

View File

@ -0,0 +1,39 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel(description = "SysLoginLog")
@TableName("sys_login_log")
public class SysLoginLog extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "用户账号")
@TableField("username")
private String username;
@ApiModelProperty(value = "登录IP地址")
@TableField("ipaddr")
private String ipaddr;
@ApiModelProperty(value = "登录状态0成功 1失败")
@TableField("status")
private Integer status;
@ApiModelProperty(value = "提示信息")
@TableField("msg")
private String msg;
@ApiModelProperty(value = "访问时间")
@TableField("access_time")
private Date accessTime;
}

View File

@ -0,0 +1,62 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(description = "菜单")
@TableName("sys_menu")
public class SysMenu extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "所属上级")
@TableField("parent_id")
private Long parentId;
@ApiModelProperty(value = "名称")
@TableField("name")
private String name;
@ApiModelProperty(value = "类型(1:菜单,2:按钮)")
@TableField("type")
private Integer type;
@ApiModelProperty(value = "路由地址")
@TableField("path")
private String path;
@ApiModelProperty(value = "组件路径")
@TableField("component")
private String component;
@ApiModelProperty(value = "权限标识")
@TableField("perms")
private String perms;
@ApiModelProperty(value = "图标")
@TableField("icon")
private String icon;
@ApiModelProperty(value = "排序")
@TableField("sort_value")
private Integer sortValue;
@ApiModelProperty(value = "状态(0:禁止,1:正常)")
@TableField("status")
private Integer status;
// 下级列表
@TableField(exist = false)
private List<SysMenu> children;
// 是否选中
@TableField(exist = false)
private boolean isSelect;
}

View File

@ -0,0 +1,75 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel(description = "SysOperLog")
@TableName("sys_oper_log")
public class SysOperLog extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "模块标题")
@TableField("title")
private String title;
@ApiModelProperty(value = "业务类型0其它 1新增 2修改 3删除")
@TableField("business_type")
private String businessType;
@ApiModelProperty(value = "方法名称")
@TableField("method")
private String method;
@ApiModelProperty(value = "请求方式")
@TableField("request_method")
private String requestMethod;
@ApiModelProperty(value = "操作类别0其它 1后台用户 2手机端用户")
@TableField("operator_type")
private String operatorType;
@ApiModelProperty(value = "操作人员")
@TableField("oper_name")
private String operName;
@ApiModelProperty(value = "部门名称")
@TableField("dept_name")
private String deptName;
@ApiModelProperty(value = "请求URL")
@TableField("oper_url")
private String operUrl;
@ApiModelProperty(value = "主机地址")
@TableField("oper_ip")
private String operIp;
@ApiModelProperty(value = "请求参数")
@TableField("oper_param")
private String operParam;
@ApiModelProperty(value = "返回参数")
@TableField("json_result")
private String jsonResult;
@ApiModelProperty(value = "操作状态0正常 1异常")
@TableField("status")
private Integer status;
@ApiModelProperty(value = "错误消息")
@TableField("error_msg")
private String errorMsg;
@ApiModelProperty(value = "操作时间")
@TableField("oper_time")
private Date operTime;
}

View File

@ -0,0 +1,33 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "岗位")
@TableName("sys_post")
public class SysPost extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "岗位编码")
@TableField("post_code")
private String postCode;
@ApiModelProperty(value = "岗位名称")
@TableField("name")
private String name;
@ApiModelProperty(value = "显示顺序")
@TableField("description")
private String description;
@ApiModelProperty(value = "状态1正常 0停用")
@TableField("status")
private Integer status;
}

View File

@ -0,0 +1,32 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "角色")
@TableName("sys_role")
public class SysRole extends BaseEntity {
private static final long serialVersionUID = 1L;
//@NotBlank(message = "角色名称不能为空")
@ApiModelProperty(value = "角色名称")
@TableField("role_name")
private String roleName;
@ApiModelProperty(value = "角色编码")
@TableField("role_code")
private String roleCode;
@ApiModelProperty(value = "描述")
@TableField("description")
private String description;
}

View File

@ -0,0 +1,26 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "角色菜单")
@TableName("sys_role_menu")
public class SysRoleMenu extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "角色id")
@TableField("role_id")
private Long roleId;
@ApiModelProperty(value = "菜单id")
@TableField("menu_id")
private Long menuId;
}

View File

@ -0,0 +1,68 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(description = "用户")
@TableName("sys_user")
public class SysUser extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "用户名")
@TableField("username")
private String username;
@ApiModelProperty(value = "密码")
@TableField("password")
private String password;
@ApiModelProperty(value = "姓名")
@TableField("name")
private String name;
@ApiModelProperty(value = "手机")
@TableField("phone")
private String phone;
@ApiModelProperty(value = "头像地址")
@TableField("head_url")
private String headUrl;
@ApiModelProperty(value = "部门id")
@TableField("dept_id")
private Long deptId;
@ApiModelProperty(value = "岗位id")
@TableField("post_id")
private Long postId;
@ApiModelProperty(value = "描述")
@TableField("description")
private String description;
@ApiModelProperty(value = "openId")
@TableField("open_id")
private String openId;
@ApiModelProperty(value = "状态1正常 0停用")
@TableField("status")
private Integer status;
@TableField(exist = false)
private List<SysRole> roleList;
// 岗位
@TableField(exist = false)
private String postName;
// 部门
@TableField(exist = false)
private String deptName;
}

View File

@ -0,0 +1,25 @@
package cn.bunny.entity.system;
import cn.bunny.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "用户角色")
@TableName("sys_user_role")
public class SysUserRole extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "角色id")
@TableField("role_id")
private Long roleId;
@ApiModelProperty(value = "用户id")
@TableField("user_id")
private Long userId;
}

View File

@ -0,0 +1,22 @@
package cn.bunny.entity.system;
import cn.bunny.vo.system.RouterVo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.HashSet;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysUserinfo {
private HashSet<String> roles;
private String name;
private String avatar;
private List<String> buttons;
private List<RouterVo> routers;
}

View File

@ -0,0 +1,47 @@
package cn.bunny.enums;
import lombok.Getter;
/**
* 统一返回结果状态信息类
*/
@Getter
public enum ResultCodeEnum {
SUCCESS(200, "操作成功"),
FAIL(201, "失败"),
SERVICE_ERROR(2012, "服务异常"),
DATA_ERROR(204, "数据异常"),
ILLEGAL_REQUEST(205, "非法请求"),
REPEAT_SUBMIT(206, "重复提交"),
LOGIN_AUTH(208, "未登陆"),
PERMISSION(209, "没有权限"),
ORDER_PRICE_ERROR(210, "订单商品价格变化"),
ORDER_STOCK_FALL(204, "订单库存锁定失败"),
CREATE_ORDER_FAIL(210, "创建订单失败"),
COUPON_GET(220, "优惠券已经领取"),
COUPON_LIMIT_GET(221, "优惠券已发放完毕"),
URL_ENCODE_ERROR(216, "URL编码失败"),
ILLEGAL_CALLBACK_REQUEST_ERROR(217, "非法回调请求"),
FETCH_ACCESSTOKEN_FAILD(218, "获取accessToken失败"),
FETCH_USERINFO_ERROR(219, "获取用户信息失败"),
SKU_LIMIT_ERROR(230, "购买个数不能大于限购个数"),
REGION_OPEN(240, "该区域已开通"),
REGION_NO_OPEN(240, "该区域未开通"),
;
private final Integer code;
private final String message;
ResultCodeEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}

View File

@ -0,0 +1,18 @@
package cn.bunny.vo.process;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ApprovalVo {
private Long processId;
private String taskId;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty(value = "审批描述")
private String description;
}

View File

@ -0,0 +1,20 @@
package cn.bunny.vo.process;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "流程表单")
public class ProcessFormVo {
@ApiModelProperty(value = "审批模板id")
private Long processTemplateId;
@ApiModelProperty(value = "审批类型id")
private Long processTypeId;
@ApiModelProperty(value = "表单值")
private String formValues;
}

View File

@ -0,0 +1,31 @@
package cn.bunny.vo.process;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(description = "Process")
public class ProcessQueryVo {
@ApiModelProperty(value = "关键字")
private String keyword;
@ApiModelProperty(value = "用户id")
private Long userId;
@TableField("process_template_id")
private Long processTemplateId;
@ApiModelProperty(value = "审批类型id")
private Long processTypeId;
private String createTimeBegin;
private String createTimeEnd;
@ApiModelProperty(value = "状态0默认 1审批中 2审批通过 -1驳回")
private Integer status;
}

View File

@ -0,0 +1,59 @@
package cn.bunny.vo.process;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel(description = "Process")
public class ProcessVo {
private Long id;
private Date createTime;
@ApiModelProperty(value = "审批code")
private String processCode;
@ApiModelProperty(value = "用户id")
private Long userId;
private String name;
@TableField("process_template_id")
private Long processTemplateId;
private String processTemplateName;
@ApiModelProperty(value = "审批类型id")
private Long processTypeId;
private String processTypeName;
@ApiModelProperty(value = "标题")
private String title;
@ApiModelProperty(value = "描述")
private String description;
@ApiModelProperty(value = "表单属性")
private String formProps;
@ApiModelProperty(value = "表单选项")
private String formOptions;
@ApiModelProperty(value = "表单属性值")
private String formValues;
@ApiModelProperty(value = "流程实例id")
private String processInstanceId;
@ApiModelProperty(value = "当前审批人")
private String currentAuditor;
@ApiModelProperty(value = "状态0默认 1审批中 2审批通过 -1驳回")
private Integer status;
private String taskId;
}

View File

@ -0,0 +1,20 @@
package cn.bunny.vo.system;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(description = "分配菜单")
@Data
public class AssginMenuVo {
@ApiModelProperty(value = "角色id")
private Long roleId;
@ApiModelProperty(value = "菜单id列表")
private List<Long> menuIdList;
}

View File

@ -0,0 +1,20 @@
package cn.bunny.vo.system;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(description = "分配菜单")
@Data
public class AssginRoleVo {
@ApiModelProperty(value = "用户id")
private Long userId;
@ApiModelProperty(value = "角色id列表")
private List<Long> roleIdList;
}

View File

@ -0,0 +1,34 @@
package cn.bunny.vo.system;
/**
* 登录对象
*/
public class LoginVo {
/**
* 手机号
*/
private String username;
/**
* 密码
*/
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}

View File

@ -0,0 +1,29 @@
package cn.bunny.vo.system;
import lombok.Data;
/**
* 路由显示信息
*/
@Data
public class MetaVo {
/**
* 设置该路由在侧边栏和面包屑中展示的名字
*/
private String title;
/**
* 设置该路由的图标对应路径src/assets/icons/svg
*/
private String icon;
public MetaVo() {
}
public MetaVo(String title, String icon) {
this.title = title;
this.icon = icon;
}
}

View File

@ -0,0 +1,48 @@
package cn.bunny.vo.system;
import lombok.Data;
import java.util.List;
/**
* 路由配置信息
*/
@Data
public class RouterVo {
/**
* 路由名字
*/
// private String name;
/**
* 路由地址
*/
private String path;
/**
* 是否隐藏路由当设置 true 的时候该路由不会再侧边栏出现
*/
private boolean hidden;
/**
* 组件地址
*/
private String component;
/**
* 当你一个路由下面的 children 声明的路由大于1个时自动会变成嵌套的模式--如组件页面
*/
private Boolean alwaysShow;
/**
* 其他元素
*/
private MetaVo meta;
/**
* 子路由
*/
private List<RouterVo> children;
}

View File

@ -0,0 +1,16 @@
package cn.bunny.vo.system;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class SysLoginLogQueryVo {
@ApiModelProperty(value = "用户账号")
private String username;
private String createTimeBegin;
private String createTimeEnd;
}

View File

@ -0,0 +1,15 @@
package cn.bunny.vo.system;
import lombok.Data;
@Data
public class SysOperLogQueryVo {
private String title;
private String operName;
private String createTimeBegin;
private String createTimeEnd;
}

View File

@ -0,0 +1,19 @@
package cn.bunny.vo.system;
import lombok.Data;
@Data
public class SysPostQueryVo {
//@ApiModelProperty(value = "岗位编码")
private String postCode;
//@ApiModelProperty(value = "岗位名称")
private String name;
//@ApiModelProperty(value = "状态1正常 0停用")
private Boolean status;
}

View File

@ -0,0 +1,29 @@
//
//
package cn.bunny.vo.system;
import java.io.Serializable;
/**
* <p>
* 角色查询实体
* </p>
*
* @author qy
* @since 2019-11-08
*/
public class SysRoleQueryVo implements Serializable {
private static final long serialVersionUID = 1L;
private String roleName;
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
}

View File

@ -0,0 +1,30 @@
//
//
package cn.bunny.vo.system;
import lombok.Data;
import java.io.Serializable;
/**
* <p>
* 用户查询实体
* </p>
*/
@Data
public class SysUserQueryVo implements Serializable {
private static final long serialVersionUID = 1L;
private String keyword;
private String createTimeBegin;
private String createTimeEnd;
private Long roleId;
private Long postId;
private Long deptId;
}

View File

@ -0,0 +1,14 @@
package cn.bunny.vo.wechat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BindPhoneVo {
@ApiModelProperty(value = "手机")
private String phone;
@ApiModelProperty(value = "openId")
private String openId;
}

View File

@ -0,0 +1,39 @@
package cn.bunny.vo.wechat;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(description = "菜单")
public class MenuVo {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "id")
private Long parentId;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "url")
private String url;
@ApiModelProperty(value = "菜单key")
private String meunKey;
@ApiModelProperty(value = "排序")
private Integer sort;
@ApiModelProperty(value = "下级")
@TableField(exist = false)
private List<MenuVo> children;
}

21
pom.xml
View File

@ -9,24 +9,27 @@
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>cn.bunny</groupId> <groupId>cn.bunny</groupId>
<artifactId>java-template</artifactId> <artifactId>bunny-template</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>java-template</name> <name>bunny-template</name>
<description>java-template</description> <description>bunny-template</description>
<modules> <modules>
<module>common</module> <module>common</module>
<module>model</module> <module>model</module>
<module>service</module> <module>service</module>
</modules> </modules>
<properties> <properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<java.version>21</java.version> <java.version>21</java.version>
<mybatis-plus.version>3.5.6</mybatis-plus.version> <mybatis-plus.version>3.5.6</mybatis-plus.version>
<mysql.version>8.0.33</mysql.version> <mysql.version>8.0.30</mysql.version>
<knife4j.version>3.0.3</knife4j.version> <knife4j.version>3.0.3</knife4j.version>
<fastjson2.version>2.0.47</fastjson2.version> <fastjson2.version>2.0.47</fastjson2.version>
<minio.version>8.4.3</minio.version> <minio.version>8.5.9</minio.version>
<lombok.version>1.18.32</lombok.version> <lombok.version>1.18.32</lombok.version>
<easyexcel.version>3.3.3</easyexcel.version> <easyexcel.version>3.3.3</easyexcel.version>
<jodatime.version>2.10.1</jodatime.version> <jodatime.version>2.10.1</jodatime.version>
@ -36,7 +39,7 @@
<!-- mybatis-plus --> <!-- mybatis-plus -->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>${mybatis-plus.version}</version> <version>${mybatis-plus.version}</version>
</dependency> </dependency>
<!-- mysql --> <!-- mysql -->
@ -69,6 +72,12 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>${lombok.version}</version> <version>${lombok.version}</version>
</dependency> </dependency>
<!-- hutool -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.25</version>
</dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>

View File

@ -3,13 +3,12 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>cn.bunny</groupId> <groupId>cn.bunny</groupId>
<artifactId>java-template</artifactId> <artifactId>bunny-template</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent> </parent>
<artifactId>service</artifactId> <artifactId>service</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>service</name> <name>service</name>
<url>https://maven.apache.org</url> <url>https://maven.apache.org</url>
@ -18,16 +17,9 @@
<docker.repostory>192.168.3.98:1100</docker.repostory> <docker.repostory>192.168.3.98:1100</docker.repostory>
<docker.host>192.168.3.98:2375</docker.host> <docker.host>192.168.3.98:2375</docker.host>
<docker.registry.name>bunny-service</docker.registry.name> <docker.registry.name>bunny-service</docker.registry.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencies> <dependencies>
<!-- 数据载体 -->
<dependency>
<groupId>cn.bunny</groupId>
<artifactId>model</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!-- service-utils --> <!-- service-utils -->
<dependency> <dependency>
<groupId>cn.bunny</groupId> <groupId>cn.bunny</groupId>
@ -46,11 +38,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
</dependency> </dependency>
<!-- knife4j -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1,9 +1,13 @@
package cn.bunny.service; package cn.bunny.service;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication @SpringBootApplication
@ComponentScan(basePackages = {"cn.bunny"})
@MapperScan("cn.bunny.service.mapper")
public class ServiceApplication { public class ServiceApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ServiceApplication.class, args); SpringApplication.run(ServiceApplication.class, args);

View File

@ -0,0 +1,47 @@
package cn.bunny.service.controller;
import cn.bunny.common.service.result.Result;
import cn.bunny.entity.system.Login;
import cn.bunny.entity.system.SysUserinfo;
import cn.bunny.service.service.SysUserService;
import cn.bunny.vo.system.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* <p>
* 后台登录登出
* </p>
*/
@Api(tags = "后台登录管理")
@RestController
@RequestMapping("/admin/system/index")
public class IndexController {
@Autowired
private SysUserService sysUserService;
@Operation(summary = "登录", description = "登录")
@PostMapping("login")
public Result<Login> login(@RequestBody LoginVo loginVo) {
Login login = sysUserService.login(loginVo);
return Result.success(login);
}
@Operation(summary = "获取用户信息", description = "获取用户信息")
@GetMapping("info")
public Result<SysUserinfo> info(HttpServletRequest request) {
SysUserinfo userinfo = sysUserService.getUserinfo(request);
return Result.success(userinfo);
}
@Operation(summary = "退出", description = "退出")
@PostMapping("logout")
public Result<Map<String, Object>> logout() {
return Result.success();
}
}

View File

@ -0,0 +1,19 @@
package cn.bunny.service.mapper;
import cn.bunny.entity.system.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 用户表 Mapper 接口
* </p>
*
* @author bunny
* @since 2024-04-22
*/
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
}

View File

@ -0,0 +1,35 @@
package cn.bunny.service.service;
import cn.bunny.entity.system.Login;
import cn.bunny.entity.system.SysUser;
import cn.bunny.entity.system.SysUserinfo;
import cn.bunny.vo.system.LoginVo;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;
/**
* <p>
* 用户表 服务类
* </p>
*
* @author bunny
* @since 2024-04-22
*/
public interface SysUserService extends IService<SysUser> {
/**
* 登录
*
* @param vo 登录条件
* @return 返回token
*/
Login login(LoginVo vo);
/**
* 获取用户信息
*
* @param request 请求头
* @return 用户信息
*/
SysUserinfo getUserinfo(HttpServletRequest request);
}

View File

@ -0,0 +1,72 @@
package cn.bunny.service.service.impl;
import cn.bunny.common.service.constant.MessageConstant;
import cn.bunny.common.service.exception.BunnyException;
import cn.bunny.entity.system.Login;
import cn.bunny.entity.system.SysUser;
import cn.bunny.entity.system.SysUserinfo;
import cn.bunny.service.mapper.SysUserMapper;
import cn.bunny.service.service.SysUserService;
import cn.bunny.vo.system.LoginVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;
/**
* <p>
* 用户表 服务实现类
* </p>
*
* @author bunny
* @since 2024-04-22
*/
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
/**
* 登录
*
* @param vo 登录条件
* @return 返回token
*/
@Override
public Login login(LoginVo vo) {
String username = vo.getUsername();
String password = vo.getPassword();
// 查询用户信息
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SysUser::getUsername, username);
SysUser sysUser = getOne(wrapper);
// 用户是否存在
if (sysUser == null) {
throw new BunnyException(MessageConstant.ACCOUNT_NOT_FOUND);
}
// 判断是否被禁用
if (sysUser.getStatus() == 0) {
throw new BunnyException(MessageConstant.ACCOUNT_LOCKED);
}
// 判断密码
String md5DigestAsHexPassword = DigestUtils.md5DigestAsHex(password.getBytes());
if (!md5DigestAsHexPassword.equals(sysUser.getPassword())) {
throw new BunnyException(MessageConstant.PASSWORD_ERROR);
}
// 添加token
return Login.builder().token("token").build();
}
/**
* 获取用户信息
*
* @param request 请求头
* @return 用户信息
*/
@Override
public SysUserinfo getUserinfo(HttpServletRequest request) {
return null;
}
}

View File

@ -10,4 +10,10 @@ bunny:
host: 47.120.65.66 host: 47.120.65.66
port: 6379 port: 6379
database: 3 database: 3
password: "02120212" password: "02120212"
minio:
endpointUrl: "http://129.211.31.58:9000"
bucket-name: ssyx
accessKey: bunny
secretKey: "02120212"

View File

@ -31,6 +31,11 @@ spring:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8 time-zone: GMT+8
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
logging: logging:
level: level:
cn.bunny.service.mapper: debug cn.bunny.service.mapper: debug
@ -39,4 +44,5 @@ logging:
pattern: pattern:
dateformat: HH:mm:ss:SSS dateformat: HH:mm:ss:SSS
file: file:
path: "logs/${spring.application.name}" path: "logs/${spring.application.name}"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.bunny.service.mapper.SysUserMapper">
</mapper>

View File

@ -1,38 +0,0 @@
package cn.bunny;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}