org.onetwo.dbm.spring.EnableDbmSelector Maven / Gradle / Ivy
package org.onetwo.dbm.spring;
import java.util.ArrayList;
import java.util.List;
import org.onetwo.common.db.filequery.NamedQueryInfoParserConfiguration;
import org.onetwo.common.spring.context.AbstractImportSelector;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotationMetadata;
/**
* @author wayshall
*
*/
public class EnableDbmSelector extends AbstractImportSelector {
@Override
protected List doSelect(AnnotationMetadata metadata, AnnotationAttributes attributes) {
List classNames = new ArrayList();
classNames.add(DbmSpringConfiguration.class.getName());
classNames.add(NamedQueryInfoParserConfiguration.class.getName());
boolean enableDbmRepository = attributes.getBoolean("enableDbmRepository");
if(enableDbmRepository){
classNames.add(DbmRepositoryRegistarOfEnableDbm.class.getName());
}
// classNames.add(DbmLockerConfiguration.class.getName());
return classNames;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy