feat: 添加 spring-boot-mybatis starter.

This commit is contained in:
ljh01459796
2023-06-25 16:42:49 +08:00
parent 00487ac4ef
commit 1f3be99b3b
8 changed files with 220 additions and 17 deletions

View File

@@ -13,4 +13,6 @@ public interface FilterOrderConst {
int TRICE_ID_FILTER = Integer.MIN_VALUE + 10;
int MYBATIS_CACHE_CLEAR_FILTER = Integer.MIN_VALUE + 100000;
}

View File

@@ -0,0 +1,33 @@
package com.orion.ops.framework.common.filter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import javax.servlet.Filter;
/**
* 过滤器构造器
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/6/25 15:05
*/
public class FilterCreator {
private FilterCreator() {
}
/**
* 创建过滤器
*
* @param filter filter
* @param order order
* @param <T> type
* @return filter bean
*/
public static <T extends Filter> FilterRegistrationBean<T> create(T filter, Integer order) {
FilterRegistrationBean<T> bean = new FilterRegistrationBean<>(filter);
bean.setOrder(order);
return bean;
}
}