移除系统重名 AnonymousAccess 注解

修复AnonymousAccessController 测试类 AnonymousAccess注解引用错误问题
SecurityConfig: 判定接口匿名不区分大小写
表单生成器优化
pull/174/head
jyao 2019-11-04 13:20:26 +08:00
parent 9dd0bfb42e
commit 2bd8a9e4df
5 changed files with 6 additions and 25 deletions

View File

@ -1,6 +1,6 @@
package me.zhengjie.modules.monitor.rest;
import me.zhengjie.modules.security.annotation.AnonymousAccess;
import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,18 +0,0 @@
package me.zhengjie.modules.security.annotation;
import me.zhengjie.aspect.LimitType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author jacky
* 访
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AnonymousAccess {
}

View File

@ -1,7 +1,6 @@
package me.zhengjie.modules.security.config;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.config.ElPermissionConfig;
import me.zhengjie.modules.security.security.JwtAuthenticationEntryPoint;
import me.zhengjie.modules.security.security.JwtAuthorizationTokenFilter;
import me.zhengjie.modules.security.service.JwtUserDetailsService;
@ -88,7 +87,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
HandlerMethod handlerMethod = infoEntry.getValue();
AnonymousAccess anonymousAccess = handlerMethod.getMethodAnnotation(AnonymousAccess.class);
PreAuthorize preAuthorize = handlerMethod.getMethodAnnotation(PreAuthorize.class);
if (null != preAuthorize && preAuthorize.value().contains("anonymous")) {
if (null != preAuthorize && preAuthorize.value().toLowerCase().contains("anonymous")) {
anonymousUrls.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
} else if (null != anonymousAccess && null == preAuthorize) {
anonymousUrls.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());

View File

@ -6,9 +6,9 @@
<#if column.changeColumnName != '${pkChangeColName}'>
<el-form-item label="<#if column.columnComment != ''>${column.columnComment}<#else>${column.changeColumnName}</#if>" <#if column.columnKey = 'UNI'>prop="${column.changeColumnName}"</#if>>
<#if column.columnType != 'Timestamp'>
<el-input v-model="form.${column.changeColumnName}" style="width: 370px;"/>
<el-input v-model="form.${column.changeColumnName}" :type="(form.${column.changeColumnName} && form.${column.changeColumnName}.length ) > 35 ? 'textarea': 'text'" style="width: 370px;"/>
<#else >
<el-date-picker v-model="form.${column.changeColumnName}" type="datetime" style="width: 370px;"/>
<el-date-picker type="datetime" v-model="form.${column.changeColumnName}" style="width: 370px;"/>
</#if>
</el-form-item>
</#if>

View File

@ -40,7 +40,7 @@
<#list columns as column>
<#if column.columnShow = 'true'>
<#if column.columnType != 'Timestamp'>
<el-table-column prop="${column.changeColumnName}" label="<#if column.columnComment != ''>${column.columnComment}<#else>${column.changeColumnName}</#if>"/>
<el-table-column prop="${column.changeColumnName}" show-overflow-tooltip tooltip-effect="light" label="<#if column.columnComment != ''>${column.columnComment}<#else>${column.changeColumnName}</#if>"/>
<#else>
<el-table-column prop="${column.changeColumnName}" label="<#if column.columnComment != ''>${column.columnComment}<#else>${column.changeColumnName}</#if>">
<template slot-scope="scope">