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

com.sinszm.sofa.SofaBootStarterConfiguration Maven / Gradle / Ivy

Go to download

高可用服务框架,公共依赖库 Copyright © 2021 智慧程序猿(sinsz.com) All rights reserved.

The newest version!
package com.sinszm.sofa;


import cn.hutool.extra.spring.EnableSpringUtil;
import com.sinszm.sofa.annotation.EnableValidate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 配置加载中心
 * @author sinszm
 */
@EnableValidate
@EnableSpringUtil
@ComponentScans({@ComponentScan("com.sinszm.*")})
@PropertySource("classpath:settings.properties")
@EnableConfigurationProperties({SzmLogProperties.class, SzmThrowableProperties.class, SzmLicenseProperties.class})
public class SofaBootStarterConfiguration implements WebMvcConfigurer {

    @Resource
    private LicenseAdapter licenseAdapter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(licenseAdapter).addPathPatterns("/**");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy