All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.healthy.security.browser.authorize.BrowserAuthorizeConfigProvider Maven / Gradle / Ivy

package com.healthy.security.browser.authorize;

import com.healthy.common.security.authorize.AuthorizeConfigProvider;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.stereotype.Component;

/**
 * BrowserAuthorizeConfigProvider
 *
 * @author xiaomingzhang
 */
@Component
@Order(Integer.MIN_VALUE)
public class BrowserAuthorizeConfigProvider implements AuthorizeConfigProvider {

    @Override
    public boolean config(ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry config) {
        config.antMatchers(HttpMethod.GET, "/**/*.js", "/**/*.css", "/**/*.jpg",
                "/**/*.png", "/**/*.gif", "/**/*.ico").permitAll();
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy