添加注释
This commit is contained in:
@@ -24,6 +24,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新注入拦截器
|
* 更新注入拦截器
|
||||||
|
* <p>
|
||||||
|
* 更新方法参数一般是枚举(目前也仅支持枚举), 此处便是将这些枚举注入到前端以供使用
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -68,6 +70,7 @@ public class UpdateMethodInterceptor implements HandlerInterceptor {
|
|||||||
|
|
||||||
optionArgCache = new HashMap<>();
|
optionArgCache = new HashMap<>();
|
||||||
|
|
||||||
|
// 扫描潜在更新方法, 并读取其参数
|
||||||
List<UpdateMethodInfo> potentialUpdateMethods = updateDataService.getPotentialUpdateMethodInfos();
|
List<UpdateMethodInfo> potentialUpdateMethods = updateDataService.getPotentialUpdateMethodInfos();
|
||||||
for (UpdateMethodInfo info : potentialUpdateMethods) {
|
for (UpdateMethodInfo info : potentialUpdateMethods) {
|
||||||
for (UpdateMethodInfo.UpdateParamInfo paramInfo : info.getParams()) {
|
for (UpdateMethodInfo.UpdateParamInfo paramInfo : info.getParams()) {
|
||||||
|
|||||||
@@ -11,18 +11,36 @@ import link.at17.mid.tushare.data.typehandler.JsonListTypeHandler;
|
|||||||
import link.at17.mid.tushare.system.util.EncryptUtils;
|
import link.at17.mid.tushare.system.util.EncryptUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储更新方法信息
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class UpdateMethodInfo {
|
public class UpdateMethodInfo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法名
|
||||||
|
*/
|
||||||
private String methodName;
|
private String methodName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法所在类名
|
||||||
|
*/
|
||||||
private String declaringClassName;
|
private String declaringClassName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法友好名称,供前端展示用
|
||||||
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数列表
|
||||||
|
*/
|
||||||
@TableField(typeHandler = JsonListTypeHandler.class)
|
@TableField(typeHandler = JsonListTypeHandler.class)
|
||||||
private List<UpdateParamInfo> params = new ArrayList<>();
|
private List<UpdateParamInfo> params = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法 id, 前端调用、传参时避免通过前端直接暴露类名和方法名
|
||||||
|
*/
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ mybatis-plus:
|
|||||||
logging.level:
|
logging.level:
|
||||||
link.at17.mid.tushare: debug
|
link.at17.mid.tushare: debug
|
||||||
link.at17.mid.tushare.test: debug
|
link.at17.mid.tushare.test: debug
|
||||||
|
org.apache.ibatis: debug
|
||||||
|
org.mybatis: debug
|
||||||
|
org.apache.ibatis.builder: TRACE
|
||||||
|
org.apache.ibatis.mapping: TRACE
|
||||||
|
org.apache.ibatis.parsing: TRACE
|
||||||
# org.springframework.security: debug
|
# org.springframework.security: debug
|
||||||
# org.springframework.security.web.access.intercept.RequestMatcherDelegatingAuthorizationManager: trace
|
# org.springframework.security.web.access.intercept.RequestMatcherDelegatingAuthorizationManager: trace
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user