package com.iformall;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.rocketmq.starter.annotation.EnableRocketMQ;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author chenkx
 * @date   2017-12-26
 */
@SpringBootApplication
@MapperScan(basePackages = {"com.iformall.mapper"})
@EnableEncryptableProperties
@EnableRocketMQ
public class BApplication {

	@Value("${fm.exception}")
	private boolean fmException;

    @Value("${fm.exception_emails}")
    private String fmExceptionEmails;

    @Value("${fm.open}")
    private boolean fmOpen;

    @Value("${fm.upload_dir}")
    private String uploadDir;

    @Value("${pos.dev_id}")
    private String posDevId;

    @Value("${pos.req_key}")
    private String posReqKey;

    @Value("${pos.res_key}")
    private String posResKey;

    @Value("${pos.url}")
    private String posUrl;

    @Bean
    public boolean isFmException() {
        return fmException;
    }

    @Bean
    public String fmExceptionEmails() {
        return fmExceptionEmails;
    }

    @Bean
    public boolean isFmOpen() {
        return fmOpen;
    }

    @Bean
    public String fmUploadDir() {
        return uploadDir;
    }

    @Bean
    public String posDevId() {
        return posDevId;
    }

    @Bean
    public String posReqKey() {
        return posReqKey;
    }

    @Bean
    public String posResKey() {
        return posResKey;
    }

    @Bean
    public String posUrl() {
        return posUrl;
    }


	public static void main(String[] args) {
		SpringApplication.run(BApplication.class, args);
	}
}
