All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.gc.aafc.auto.ResourceNameIdentifierAutoConfiguration Maven / Gradle / Ivy

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