| | |
| | | import com.panzhihua.common.model.vos.MenuVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.security.access.ConfigAttribute; |
| | |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-25 15:08 |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | public class SercuritFilter implements FilterInvocationSecurityMetadataSource { |
| | | @Resource |
| | |
| | | public Collection<ConfigAttribute> getAttributes(Object o) throws IllegalArgumentException { |
| | | List<ConfigAttribute> configAttributes=new ArrayList<>(); |
| | | String requestUrl = ((FilterInvocation) o).getRequestUrl(); |
| | | log.info("接口请求地址【{}】",requestUrl); |
| | | Boolean aBoolean = stringRedisTemplate.hasKey(SecurityConstants.ROLE_ALL); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | List<MenuVO> menuVOS=new ArrayList<>(); |