com.github.rexsheng.springboot.faster.system.oauth2.adapter.OAuth2Module Maven / Gradle / Ivy
The newest version!
package com.github.rexsheng.springboot.faster.system.oauth2.adapter;
import com.github.rexsheng.springboot.faster.system.modular.SpringModule;
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.oauth2.server.authorization.OAuth2Authorization;
@ConditionalOnClass(OAuth2Authorization.class)
@ConditionalOnProperty(prefix = "app.module",name = "oauth2",havingValue = "true",matchIfMissing = false)
@Import({
OAuthSecurityConfig.class
})
@SpringModule
public class OAuth2Module implements InitializingBean {
private static final Logger logger= LoggerFactory.getLogger(OAuth2Module.class);
@Override
public void afterPropertiesSet() throws Exception {
logger.info("已启动模块: {}", "OAuth2 Server");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy