package com.cloudtech.demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ComponentScan;
import com.cloudtech.web.dao.FieldConfigMapper;
import com.cloudtech.web.dao.RuleCodeMapper;
@SpringBootApplication
@ComponentScan(value = {"com.cloudtech"})
public class DemoApplication implements CommandLineRunner{
@Autowired
private FieldConfigMapper fieldConfigMapper;
@Autowired
private RuleCodeMapper ruleCodeMapper;
public static void main(String[] args) {
//SpringApplication.run(DemoApplication.class, args);
new SpringApplicationBuilder(DemoApplication.class)
.web(WebApplicationType.NONE)
.run(args);
}
@Override
public void run(String... args) throws Exception {
}
}
实现这个接口就可以了