zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.changhong.epc.form;
 
import com.changhong.autoform.entity.BudgetData;
import com.changhong.epc.constter.system.SystemClients;
import com.changhong.epc.constter.system.run.EpcApplication;
import com.iemsoft.framework.cloud.core.tools.JSONTool;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.archaius.ArchaiusAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
 
import javax.annotation.PostConstruct;
 
@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class,ArchaiusAutoConfiguration.class
}) 
@SpringCloudApplication
@ComponentScan(basePackages={"com.changhong.epc", "com.changhong.autoform", "com.iemsoft.framework.cloud"})
public class FormApplication implements SystemClients{
 
    static final BudgetData bd = JSONTool.toObj("{\"formID\":\"3b80f635261e81d080cec3e\",\"tenantID\":\"100000001\",\"search\":[],\"pageSize\":\"5\",\"pageNum\":\"1\",\"key\":\"SuperBudgtDepartments\",\"formData\":{\"number_budget\":\"自动生成\",\"budget_type\":[\"F000001\"],\"currency\":[\"RMB\"],\"occupy\":[\"F000001\"],\"budgetStartDate\":\"2018-11-22\",\"budgetEndDate\":\"2019-01-05\",\"budgetStatement\":\"\",\"toWriteBudget\":\"\",\"budget_subFrom\":[{\"DATAROWNUM\":\"\",\"C_Type\":[\"51\"],\"budget_itemDepartment\":[\"01010000100005\"],\"budget_itemMoney\":\"\",\"budget_itemBalance\":\"\",\"budget_superMoney\":\"\",\"budget_superDepartement\":[\" \"],\"budget_project\":[]}]},\"userName\":\"王煜鑫1\"}",BudgetData.class);
 
    public static void main(String[] args) throws Exception {
        new EpcApplication(SERVER_FORM, FormApplication.class).run(args);
 
//        ThreadData.set(TENANT_ID, "100000001");
//        ThreadData.set(Keys.DATA_SOURCE, "tenant_2");
//        System.out.println(
//                JSONTool.toJson(
//                        SpringUtil.getBean(SuperBudgetSelectForm.class)
//                        .getData(bd))
//        );
    }
    
    @PostConstruct
    public void init(){
            System.setProperty("archaius.configurationSource.defaultFileName", "hystrix-config.properties");
    }