love.keeping.starter.web.config.WebBeanAutoConfiguration Maven / Gradle / Ivy
The newest version!
package love.keeping.starter.web.config;
import love.keeping.starter.web.aop.ControllerAspector;
import love.keeping.starter.web.aop.OpenApiAspect;
import love.keeping.starter.web.aop.PermissionAspect;
import love.keeping.starter.web.components.cache.CacheVariables;
import love.keeping.starter.web.components.generator.Generator;
import love.keeping.starter.web.components.generator.impl.DefaultFlowGenerator;
import love.keeping.starter.web.components.generator.impl.DefaultGenerator;
import love.keeping.starter.web.components.generator.impl.DefaultSnowFlakeGenerator;
import love.keeping.starter.web.components.security.UserTokenResolver;
import love.keeping.starter.web.components.upload.handler.UploadHandler;
import love.keeping.starter.web.components.upload.handler.impl.CosUploadHandler;
import love.keeping.starter.web.components.upload.handler.impl.LocalUploadHandler;
import love.keeping.starter.web.components.upload.handler.impl.ObsUploadHandler;
import love.keeping.starter.web.components.upload.handler.impl.OssUploadHandler;
import love.keeping.starter.web.impl.GenerateCodeServiceImpl;
import love.keeping.starter.web.resp.InvokeResultErrorBuilderWrapper;
import love.keeping.starter.web.resp.ResponseErrorBuilder;
import love.keeping.starter.web.service.GenerateCodeService;
import love.keeping.starter.web.sign.CheckSignFactory;
import love.keeping.starter.web.sign.DefaultCheckSignFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class WebBeanAutoConfiguration {
@Bean
public ControllerAspector controllerAspector() {
return new ControllerAspector();
}
@Bean
public OpenApiAspect openApiAspect() {
return new OpenApiAspect();
}
@Bean
public PermissionAspect permissionAspect() {
return new PermissionAspect();
}
@Bean
public Generator defaultFlowGenerator() {
return new DefaultFlowGenerator();
}
@Bean
public Generator defaultSnowFlakeGenerator() {
return new DefaultSnowFlakeGenerator();
}
@Bean
public Generator defaultGenerator() {
return new DefaultGenerator();
}
@Bean
public UploadHandler cosUploadHandler() {
return new CosUploadHandler();
}
@Bean
public UploadHandler localUploadHandler() {
return new LocalUploadHandler();
}
@Bean
public UploadHandler obsUploadHandler() {
return new ObsUploadHandler();
}
@Bean
public UploadHandler ossUploadHandler() {
return new OssUploadHandler();
}
@Bean
public GenerateCodeService generateCodeService() {
return new GenerateCodeServiceImpl();
}
@Bean
public ResponseErrorBuilder invokeResultBuilderWrapper() {
return new InvokeResultErrorBuilderWrapper();
}
@Bean
public CheckSignFactory defaultCheckSignFactory() {
return new DefaultCheckSignFactory();
}
@Bean("cacheVariables")
public CacheVariables cacheVariables() {
return new CacheVariables();
}
@Bean
public UserTokenResolver userTokenResolver() {
return new UserTokenResolver();
}
}