IgnoredUrlsProperties
package com.zbb.app.aop; import java.util.ArrayList; import java.util.List; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; /** * */ @Configuration @ConfigurationProperties(prefix = "ignored") public class IgnoredUrlsProperties { private List<String> urls = new ArrayList<String>(); public List<String> getUrls() { return urls; } public void setUrls(List<String> urls) { System.out.println("##########################"+urls.toString()); this.urls = urls; } }
application.yml
spring: aop: auto: true proxy-target-class: true # 忽略鉴权url ignored: urls: - /app/common/admin/getUserTypeList - /app/common/admin/sendAuthCodeN