ca.gc.aafc.auto.ResourceNameIdentifierAutoConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dina-base-api Show documentation
Show all versions of dina-base-api Show documentation
Base DINA API package for Java built on SpringBoot and Crnk
The newest version!
package ca.gc.aafc.auto;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ca.gc.aafc.dina.config.ResourceNameIdentifierConfig;
import ca.gc.aafc.dina.jpa.BaseDAO;
import ca.gc.aafc.dina.service.ResourceNameIdentifierService;
/**
* This class is outside the ComponentScan that is using DinaBaseApiAutoConfiguration base package.
*/
@Configuration
public class ResourceNameIdentifierAutoConfiguration {
@Bean
@ConditionalOnBean(ResourceNameIdentifierConfig.class)
public ResourceNameIdentifierService resourceNameIdentifierService(BaseDAO baseDAO, ResourceNameIdentifierConfig config) {
return new ResourceNameIdentifierService(baseDAO, config);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy