io.nemesis.platform.module.guarantee.config.GuaranteeModuleAutoConfiguration Maven / Gradle / Ivy
The newest version!
/*
* nemesis Platform - NExt-generation Multichannel E-commerce SYStem
*
* Copyright (c) 2010 - 2015 nemesis
* All rights reserved.
*
* This software is the confidential and proprietary information of nemesis
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with nemesis.
*/
package io.nemesis.platform.module.guarantee.config;
import io.nemesis.platform.module.guarantee.core.service.GuaranteeActivationService;
import io.nemesis.platform.module.guarantee.core.service.impl.GuaranteeActivationServiceImpl;
import io.nemesis.platform.module.guarantee.facade.GuaranteeFacade;
import io.nemesis.platform.module.guarantee.facade.impl.GuaranteeFacadeImpl;
import io.nemesis.platform.module.guarantee.storefront.controller.GuaranteeActivationController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
/**
* A spring {@code Configuration} for the guarantee module spring beans.
*
* @author Petar Tahchiev
* @since 0.6
*/
@Configuration
public class GuaranteeModuleAutoConfiguration {
protected final Logger LOG = LoggerFactory.getLogger(getClass());
@PostConstruct
public void init() {
LOG.info("Initializing [guarantee] module ...");
}
@Bean(name = GuaranteeActivationService.NAME)
@ConditionalOnMissingBean(name = GuaranteeActivationService.NAME)
public GuaranteeActivationService defaultGuaranteeActivationServiceImpl() {
return new GuaranteeActivationServiceImpl();
}
/* facade */
@Bean(name = GuaranteeFacade.NAME)
@ConditionalOnMissingBean(name = GuaranteeFacade.NAME)
public GuaranteeFacade defaultGuaranteeFacadeImpl() {
return new GuaranteeFacadeImpl();
}
/* storefront */
@Bean
@ConditionalOnMissingBean
public GuaranteeActivationController defaultGuaranteeActivationViewController() {
return new GuaranteeActivationController();
}
}