org.apache.shiro.spring.boot.ShiroQrcodeWebAutoConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shiro-qrcode-spring-boot-starter Show documentation
Show all versions of shiro-qrcode-spring-boot-starter Show documentation
Spring Boot Starter For Shiro With Qrcode
The newest version!
package org.apache.shiro.spring.boot;
import org.apache.shiro.spring.web.config.AbstractShiroWebConfiguration;
import org.springframework.beans.BeansException;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
//https://blog.csdn.net/weixin_42058600/article/details/81837056
@Configuration
@AutoConfigureBefore( name = {
"org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration", // shiro-spring-boot-web-starter
"org.apache.shiro.spring.boot.ShiroBizWebAutoConfiguration" // spring-boot-starter-shiro-biz
})
@ConditionalOnProperty(prefix = ShiroQrcodeProperties.PREFIX, value = "enabled", havingValue = "true")
@EnableConfigurationProperties({ ShiroQrcodeProperties.class })
public class ShiroQrcodeWebAutoConfiguration extends AbstractShiroWebConfiguration implements ApplicationContextAware {
private ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
public ApplicationContext getApplicationContext() {
return applicationContext;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy