package com.jeelowcode.service.bpm.config.framework.portal.config;

import com.jeelowcode.service.bpm.config.framework.portal.core.PortalRequest;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * 门户待办配置
 *
 * @author shelly
 */
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(PortalTodoProperties.class)
public class PortalTodoConfiguration {

    @Resource
    private PortalTodoProperties portalTodoProperties;

    @Bean
    public PortalRequest getPortalRequest() {
        return new PortalRequest(
                portalTodoProperties.getSysCode(),
                portalTodoProperties.getDomain(),
                portalTodoProperties.getProtocol());
    }

}
