mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-12-12 20:29:27 +08:00
⚡ 更新author
This commit is contained in:
parent
b6866d4691
commit
ecbce36218
@ -26,7 +26,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置类
|
* 配置类
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -33,7 +33,7 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* WEB配置
|
* WEB配置
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -29,7 +29,7 @@ import org.springframework.context.annotation.Profile;
|
|||||||
/**
|
/**
|
||||||
* mybatisplus 配置
|
* mybatisplus 配置
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@MapperScan("org.springblade.**.mapper.**")
|
@MapperScan("org.springblade.**.mapper.**")
|
||||||
|
@ -36,7 +36,7 @@ import java.time.Duration;
|
|||||||
/**
|
/**
|
||||||
* RedisTemplate 配置
|
* RedisTemplate 配置
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@EnableCaching
|
@EnableCaching
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -25,7 +25,7 @@ import org.springframework.retry.interceptor.RetryOperationsInterceptor;
|
|||||||
/**
|
/**
|
||||||
* 重试机制
|
* 重试机制
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -34,7 +34,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Blade控制器封装类
|
* Blade控制器封装类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeController {
|
public class BladeController {
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import java.util.Enumeration;
|
|||||||
/**
|
/**
|
||||||
* feign 传递Request header
|
* feign 传递Request header
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BladeFeignRequestHeaderInterceptor implements RequestInterceptor {
|
public class BladeFeignRequestHeaderInterceptor implements RequestInterceptor {
|
||||||
|
@ -39,7 +39,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
/**
|
/**
|
||||||
* 自定义Feign的隔离策略
|
* 自定义Feign的隔离策略
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class FeignHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy {
|
public class FeignHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy {
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件封装
|
* 上传文件封装
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeFile {
|
public class BladeFile {
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@ import java.util.Date;
|
|||||||
/**
|
/**
|
||||||
* 文件代理类
|
* 文件代理类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeFileProxyFactory implements IFileProxy {
|
public class BladeFileProxyFactory implements IFileProxy {
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import java.util.*;
|
|||||||
/**
|
/**
|
||||||
* 文件工具类
|
* 文件工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeFileUtil {
|
public class BladeFileUtil {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import java.io.File;
|
|||||||
/**
|
/**
|
||||||
* 文件管理类
|
* 文件管理类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class FileProxyManager {
|
public class FileProxyManager {
|
||||||
private IFileProxy defaultFileProxyFactory = new BladeFileProxyFactory();
|
private IFileProxy defaultFileProxyFactory = new BladeFileProxyFactory();
|
||||||
|
@ -20,7 +20,7 @@ import java.io.File;
|
|||||||
/**
|
/**
|
||||||
* 文件代理接口
|
* 文件代理接口
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface IFileProxy {
|
public interface IFileProxy {
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
|||||||
/**
|
/**
|
||||||
* Token转化BladeUser
|
* Token转化BladeUser
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class TokenArgumentResolver implements HandlerMethodArgumentResolver {
|
public class TokenArgumentResolver implements HandlerMethodArgumentResolver {
|
||||||
|
@ -29,7 +29,7 @@ import java.util.function.Function;
|
|||||||
/**
|
/**
|
||||||
* 项目启动器,搞定环境变量问题
|
* 项目启动器,搞定环境变量问题
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeApplication {
|
public class BladeApplication {
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
|
|||||||
/**
|
/**
|
||||||
* 系统启动完毕后执行
|
* 系统启动完毕后执行
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class BladeLineRunner implements CommandLineRunner {
|
public class BladeLineRunner implements CommandLineRunner {
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* 项目启动事件通知
|
* 项目启动事件通知
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
/**
|
/**
|
||||||
* Consul自定义注册规则
|
* Consul自定义注册规则
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnConsulEnabled
|
@ConditionalOnConsulEnabled
|
||||||
|
@ -29,7 +29,7 @@ import org.springframework.core.annotation.Order;
|
|||||||
/**
|
/**
|
||||||
* 配置类
|
* 配置类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -18,7 +18,7 @@ package org.springblade.core.launch.constant;
|
|||||||
/**
|
/**
|
||||||
* 系统常量
|
* 系统常量
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface AppConstant {
|
public interface AppConstant {
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ import org.springframework.cloud.consul.serviceregistry.ConsulServiceRegistry;
|
|||||||
/**
|
/**
|
||||||
* Consul自定义注册规则
|
* Consul自定义注册规则
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeConsulServiceRegistry extends ConsulServiceRegistry {
|
public class BladeConsulServiceRegistry extends ConsulServiceRegistry {
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 配置文件
|
* 配置文件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@ConfigurationProperties("blade")
|
@ConfigurationProperties("blade")
|
||||||
public class BladeProperties {
|
public class BladeProperties {
|
||||||
|
@ -21,7 +21,7 @@ import org.springframework.cloud.commons.util.InetUtils;
|
|||||||
/**
|
/**
|
||||||
* 服务器信息
|
* 服务器信息
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ServerInfo {
|
public class ServerInfo {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
|
|||||||
/**
|
/**
|
||||||
* launcher 扩展 用于一些组件发现
|
* launcher 扩展 用于一些组件发现
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface LauncherService {
|
public interface LauncherService {
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import java.lang.annotation.*;
|
|||||||
/**
|
/**
|
||||||
* 操作日志注解
|
* 操作日志注解
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ -26,7 +26,7 @@ import org.springblade.core.log.publisher.ApiLogPublisher;
|
|||||||
/**
|
/**
|
||||||
* 操作日志使用spring event异步入库
|
* 操作日志使用spring event异步入库
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Aspect
|
@Aspect
|
||||||
|
@ -39,7 +39,7 @@ import javax.servlet.Servlet;
|
|||||||
/**
|
/**
|
||||||
* 统一异常处理
|
* 统一异常处理
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
/**
|
/**
|
||||||
* 日志工具自动配置
|
* 日志工具自动配置
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -18,7 +18,7 @@ package org.springblade.core.log.constant;
|
|||||||
/**
|
/**
|
||||||
* 事件常量
|
* 事件常量
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface EventConstant {
|
public interface EventConstant {
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 全局异常处理
|
* 全局异常处理
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BladeErrorAttributes extends DefaultErrorAttributes {
|
public class BladeErrorAttributes extends DefaultErrorAttributes {
|
||||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 更改html请求异常为ajax
|
* 更改html请求异常为ajax
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeErrorController extends BasicErrorController {
|
public class BladeErrorController extends BasicErrorController {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ import java.util.Set;
|
|||||||
/**
|
/**
|
||||||
* 全局异常处理,处理可预见的异常
|
* 全局异常处理,处理可预见的异常
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -23,7 +23,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 系统日志事件
|
* 系统日志事件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ApiLogEvent extends ApplicationEvent {
|
public class ApiLogEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 异步监听日志事件
|
* 异步监听日志事件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@ -23,7 +23,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 错误日志事件
|
* 错误日志事件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ErrorLogEvent extends ApplicationEvent {
|
public class ErrorLogEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 异步监听错误日志事件
|
* 异步监听错误日志事件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@ -23,7 +23,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 系统日志事件
|
* 系统日志事件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class UsualLogEvent extends ApplicationEvent {
|
public class UsualLogEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 异步监听日志事件
|
* 异步监听日志事件
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@ -23,7 +23,7 @@ import org.springblade.core.tool.api.ResultCode;
|
|||||||
/**
|
/**
|
||||||
* 业务异常
|
* 业务异常
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ServiceException extends RuntimeException {
|
public class ServiceException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 2359767895161832954L;
|
private static final long serialVersionUID = 2359767895161832954L;
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
/**
|
/**
|
||||||
* Feign接口类
|
* Feign接口类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@FeignClient(
|
@FeignClient(
|
||||||
value = AppConstant.APPLICATION_LOG_NAME
|
value = AppConstant.APPLICATION_LOG_NAME
|
||||||
|
@ -23,7 +23,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
/**
|
/**
|
||||||
* 日志工具类
|
* 日志工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BladeLogger implements InitializingBean {
|
public class BladeLogger implements InitializingBean {
|
||||||
|
@ -30,7 +30,7 @@ import java.time.LocalDateTime;
|
|||||||
/**
|
/**
|
||||||
* 实体类
|
* 实体类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("blade_log_api")
|
@TableName("blade_log_api")
|
||||||
|
@ -21,7 +21,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
/**
|
/**
|
||||||
* LogApi视图实体类
|
* LogApi视图实体类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ -31,7 +31,7 @@ import java.time.LocalDateTime;
|
|||||||
/**
|
/**
|
||||||
* 服务 异常
|
* 服务 异常
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("blade_log_error")
|
@TableName("blade_log_error")
|
||||||
|
@ -21,7 +21,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
/**
|
/**
|
||||||
* LogError视图实体类
|
* LogError视图实体类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ -30,7 +30,7 @@ import java.time.LocalDateTime;
|
|||||||
/**
|
/**
|
||||||
* 实体类
|
* 实体类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
* @since 2018-10-12
|
* @since 2018-10-12
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ -21,7 +21,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
/**
|
/**
|
||||||
* LogUsual视图实体类
|
* LogUsual视图实体类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* API日志信息事件发送
|
* API日志信息事件发送
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ApiLogPublisher {
|
public class ApiLogPublisher {
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* BLADE日志信息事件发送
|
* BLADE日志信息事件发送
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class BladeLogPublisher {
|
public class BladeLogPublisher {
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 异常信息事件发送
|
* 异常信息事件发送
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ErrorLogPublisher {
|
public class ErrorLogPublisher {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import org.apache.ibatis.reflection.MetaObject;
|
|||||||
/**
|
/**
|
||||||
* mybatisplus自定义填充
|
* mybatisplus自定义填充
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BladeMetaObjectHandler implements MetaObjectHandler {
|
public class BladeMetaObjectHandler implements MetaObjectHandler {
|
||||||
|
@ -30,7 +30,7 @@ import java.time.LocalDateTime;
|
|||||||
/**
|
/**
|
||||||
* 基础实体类
|
* 基础实体类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BaseEntity implements Serializable {
|
public class BaseEntity implements Serializable {
|
||||||
|
@ -24,7 +24,7 @@ import java.util.List;
|
|||||||
* 基础业务接口
|
* 基础业务接口
|
||||||
*
|
*
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface BaseService<T> extends IService<T> {
|
public interface BaseService<T> extends IService<T> {
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ import java.util.List;
|
|||||||
*
|
*
|
||||||
* @param <M> mapper
|
* @param <M> mapper
|
||||||
* @param <T> model
|
* @param <T> model
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Validated
|
@Validated
|
||||||
public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity> extends ServiceImpl<M, T> implements BaseService<T> {
|
public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity> extends ServiceImpl<M, T> implements BaseService<T> {
|
||||||
|
@ -24,7 +24,7 @@ import java.util.stream.Collectors;
|
|||||||
/**
|
/**
|
||||||
* 视图包装基类
|
* 视图包装基类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public abstract class BaseEntityWrapper<E, V> {
|
public abstract class BaseEntityWrapper<E, V> {
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 分页工具
|
* 分页工具
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class Condition {
|
public class Condition {
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import lombok.experimental.Accessors;
|
|||||||
/**
|
/**
|
||||||
* 分页工具
|
* 分页工具
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@ -22,7 +22,7 @@ import lombok.Data;
|
|||||||
/**
|
/**
|
||||||
* AuthInfo
|
* AuthInfo
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(description = "认证信息")
|
@ApiModel(description = "认证信息")
|
||||||
|
@ -23,7 +23,7 @@ import java.io.Serializable;
|
|||||||
/**
|
/**
|
||||||
* 用户实体
|
* 用户实体
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BladeUser implements Serializable {
|
public class BladeUser implements Serializable {
|
||||||
|
@ -20,7 +20,7 @@ import java.lang.annotation.*;
|
|||||||
/**
|
/**
|
||||||
* 权限注解 用于检查权限 规定访问权限
|
* 权限注解 用于检查权限 规定访问权限
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ -40,7 +40,7 @@ import java.lang.reflect.Method;
|
|||||||
/**
|
/**
|
||||||
* AOP 鉴权
|
* AOP 鉴权
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Aspect
|
@Aspect
|
||||||
public class AuthAspect implements ApplicationContextAware {
|
public class AuthAspect implements ApplicationContextAware {
|
||||||
|
@ -24,7 +24,7 @@ import org.springblade.core.tool.utils.StringUtil;
|
|||||||
/**
|
/**
|
||||||
* 权限判断
|
* 权限判断
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class AuthFun {
|
public class AuthFun {
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
/**
|
/**
|
||||||
* secure模块api放行默认配置
|
* secure模块api放行默认配置
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@AutoConfigureBefore(SecureConfiguration.class)
|
@AutoConfigureBefore(SecureConfiguration.class)
|
||||||
|
@ -29,7 +29,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
/**
|
/**
|
||||||
* 配置类
|
* 配置类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Order
|
@Order
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ -22,7 +22,7 @@ import org.springblade.core.tool.api.ResultCode;
|
|||||||
/**
|
/**
|
||||||
* Secure异常
|
* Secure异常
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class SecureException extends RuntimeException {
|
public class SecureException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 2359767895161832954L;
|
private static final long serialVersionUID = 2359767895161832954L;
|
||||||
|
@ -33,7 +33,7 @@ import java.util.Objects;
|
|||||||
/**
|
/**
|
||||||
* jwt拦截器校验
|
* jwt拦截器校验
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SecureInterceptor extends HandlerInterceptorAdapter {
|
public class SecureInterceptor extends HandlerInterceptorAdapter {
|
||||||
|
@ -24,7 +24,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* secure api放行配置
|
* secure api放行配置
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SecureRegistry {
|
public class SecureRegistry {
|
||||||
|
@ -35,7 +35,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Secure工具类
|
* Secure工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class SecureUtil {
|
public class SecureUtil {
|
||||||
public static final String BLADE_USER_REQUEST_ATTR = "_BLADE_USER_REQUEST_ATTR_";
|
public static final String BLADE_USER_REQUEST_ATTR = "_BLADE_USER_REQUEST_ATTR_";
|
||||||
|
@ -40,7 +40,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* swagger配置
|
* swagger配置
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableSwagger2
|
@EnableSwagger2
|
||||||
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* SwaggerProperties
|
* SwaggerProperties
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@RefreshScope
|
@RefreshScope
|
||||||
|
@ -20,7 +20,7 @@ import java.io.Serializable;
|
|||||||
/**
|
/**
|
||||||
* 业务代码接口
|
* 业务代码接口
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface IResultCode extends Serializable {
|
public interface IResultCode extends Serializable {
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import java.util.Optional;
|
|||||||
/**
|
/**
|
||||||
* 统一API响应结果封装
|
* 统一API响应结果封装
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
/**
|
/**
|
||||||
* 业务代码枚举
|
* 业务代码枚举
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -37,7 +37,7 @@ import java.util.TimeZone;
|
|||||||
/**
|
/**
|
||||||
* Jackson配置类
|
* Jackson配置类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnClass(ObjectMapper.class)
|
@ConditionalOnClass(ObjectMapper.class)
|
||||||
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 消息配置类
|
* 消息配置类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -26,7 +26,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||||||
/**
|
/**
|
||||||
* 工具配置类
|
* 工具配置类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||||
|
@ -18,7 +18,7 @@ package org.springblade.core.tool.constant;
|
|||||||
/**
|
/**
|
||||||
* 系统常量
|
* 系统常量
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface BladeConstant {
|
public interface BladeConstant {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ package org.springblade.core.tool.constant;
|
|||||||
/**
|
/**
|
||||||
* 系统默认角色
|
* 系统默认角色
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class RoleConstant {
|
public class RoleConstant {
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import lombok.Data;
|
|||||||
/**
|
/**
|
||||||
* Blade系统配置类
|
* Blade系统配置类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SystemConstant {
|
public class SystemConstant {
|
||||||
|
@ -37,7 +37,7 @@ import java.util.*;
|
|||||||
/**
|
/**
|
||||||
* Jackson工具类
|
* Jackson工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class JsonUtil {
|
public class JsonUtil {
|
||||||
|
@ -24,7 +24,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 节点基类
|
* 节点基类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BaseNode implements INode {
|
public class BaseNode implements INode {
|
||||||
|
@ -22,7 +22,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
/**
|
/**
|
||||||
* 森林节点类
|
* 森林节点类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ -21,7 +21,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 森林管理类
|
* 森林管理类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ForestNodeManager<T extends INode> {
|
public class ForestNodeManager<T extends INode> {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 森林节点归并类
|
* 森林节点归并类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ForestNodeMerger {
|
public class ForestNodeMerger {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Created by Blade.
|
* Created by Blade.
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface INode {
|
public interface INode {
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Created by Blade.
|
* Created by Blade.
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class NodeTest {
|
public class NodeTest {
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
/**
|
/**
|
||||||
* 树型节点类
|
* 树型节点类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ -6,7 +6,7 @@ import lombok.Getter;
|
|||||||
/**
|
/**
|
||||||
* Bean属性
|
* Bean属性
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -20,7 +20,7 @@ import java.io.OutputStream;
|
|||||||
/**
|
/**
|
||||||
* A factory for creating MultiOutputStream objects.
|
* A factory for creating MultiOutputStream objects.
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public interface IMultiOutputStream {
|
public interface IMultiOutputStream {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ package org.springblade.core.tool.support;
|
|||||||
/**
|
/**
|
||||||
* 图片操作类
|
* 图片操作类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class ImagePosition {
|
public class ImagePosition {
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ import java.util.HashMap;
|
|||||||
/**
|
/**
|
||||||
* 链式map
|
* 链式map
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class Kv extends LinkedCaseInsensitiveMap<Object> {
|
public class Kv extends LinkedCaseInsensitiveMap<Object> {
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import org.springblade.core.tool.utils.StringPool;
|
|||||||
/**
|
/**
|
||||||
* 字符串格式化
|
* 字符串格式化
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class StrFormatter {
|
public class StrFormatter {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import java.util.function.Function;
|
|||||||
* 当 Lambda 遇上受检异常
|
* 当 Lambda 遇上受检异常
|
||||||
* https://segmentfault.com/a/1190000007832130
|
* https://segmentfault.com/a/1190000007832130
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class Try {
|
public class Try {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import java.io.IOException;
|
|||||||
/**
|
/**
|
||||||
* XSS过滤
|
* XSS过滤
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class XssFilter implements Filter {
|
public class XssFilter implements Filter {
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* XSS过滤处理
|
* XSS过滤处理
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ import java.net.URL;
|
|||||||
/**
|
/**
|
||||||
* 图片工具类
|
* 图片工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
public final class ImageUtil {
|
public final class ImageUtil {
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Http请求工具类
|
* Http请求工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class OkHttpUtil {
|
public class OkHttpUtil {
|
||||||
|
@ -24,7 +24,7 @@ import org.springframework.context.ApplicationEvent;
|
|||||||
/**
|
/**
|
||||||
* spring 工具类
|
* spring 工具类
|
||||||
*
|
*
|
||||||
* @author smallchill
|
* @author Chill
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SpringUtil implements ApplicationContextAware {
|
public class SpringUtil implements ApplicationContextAware {
|
||||||
|
Loading…
Reference in New Issue
Block a user