|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrMwTestWeb; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponse; | 
|---|
|  |  |  | import com.dy.pipIrrMwTestWeb.test.Test; | 
|---|
|  |  |  | import com.dy.pipIrrMwTestWeb.test.CommandCtrl; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.boot.CommandLineRunner; | 
|---|
|  |  |  | import org.springframework.boot.SpringApplication; | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | public class PipIrrMwTestWebApplication implements CommandLineRunner { | 
|---|
|  |  |  | public class PipIrrMwTestWebApplication{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private Test test ; | 
|---|
|  |  |  | private CommandCtrl test ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|