| | |
| | | package com.dy.pipIrrMwTestWeb; |
| | | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.pipIrrMwTestWeb.test.Command; |
| | | import com.dy.pipIrrMwTestWeb.p206V202404test.CommandP206V202404Ctrl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | |
| | | @ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrMwTestWeb"}, |
| | | excludeFilters = { |
| | | @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = { |
| | | com.dy.common.apiDoc.SpringApiConfig.class //一种排除类的方式 |
| | | //一种排除类的方式 |
| | | com.dy.common.apiDoc.SpringApiConfig.class, |
| | | com.dy.pipIrrGlobal.config.DingTalk.class |
| | | }), |
| | | @ComponentScan.Filter(type = FilterType.REGEX, pattern = { |
| | | //二种排除类的方式,写正则表达式,需要对目标类的完全限定名完全匹配,否则不生效 |
| | |
| | | }) |
| | | } |
| | | ) |
| | | public class PipIrrMwTestWebApplication implements CommandLineRunner { |
| | | |
| | | @Autowired |
| | | private Command test ; |
| | | public class PipIrrMwTestWebApplication{ |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(PipIrrMwTestWebApplication.class, args); |
| | | } |
| | | /** |
| | | * Spring容器启动完成后,执行下面方法 |
| | | * @param args 参数 |
| | | * @throws Exception 异常 |
| | | */ |
| | | @Override |
| | | public void run(String... args) throws Exception { |
| | | BaseResponse res = test.test() ; |
| | | System.out.println(res.toString()); |
| | | } |
| | | |
| | | } |