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

com.github.rexsheng.springboot.faster.system.auth.adapter.AuthModule Maven / Gradle / Ivy

The newest version!
package com.github.rexsheng.springboot.faster.system.auth.adapter;

import com.github.rexsheng.springboot.faster.system.auth.application.AuthServiceImpl;
import com.github.rexsheng.springboot.faster.system.auth.application.security.IgnoredUrlsProperties;
import com.github.rexsheng.springboot.faster.system.auth.domain.*;
import com.github.rexsheng.springboot.faster.system.auth.infrastructure.AuthGatewayImpl;
import com.github.rexsheng.springboot.faster.system.modular.SpringModule;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Import;
import org.springframework.security.web.SecurityFilterChain;

@ConditionalOnClass({SecurityFilterChain.class,SqlSessionFactoryBean.class})
@ConditionalOnProperty(prefix = "app.module.management",name = "enabled",havingValue = "true",matchIfMissing = false)
@Import({
        AuthController.class,
        SecurityConfig.class,
        IgnoredUrlsProperties.class,
        AuthServiceImpl.class,
        DeptDomainService.class,
        MenuDomainService.class,
        SysUserDetail.class,
        TokenContainer.class,
        UserDomainService.class,
        AuthGatewayImpl.class,
        SecurityEventListener.class
})
@SpringModule
public class AuthModule implements InitializingBean {

    private static final Logger logger= LoggerFactory.getLogger(AuthModule.class);

    @Override
    public void afterPropertiesSet() throws Exception {
        logger.info("已启动模块: {}", "Management Auth");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy