PersonController.java 1.6 KB
Newer Older
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
//package com.kwan.springbootkwan.controller;
//
//import com.kwan.springbootkwan.entity.Person;
//import com.kwan.springbootkwan.entity.User;
//import com.kwan.springbootkwan.service.IUserService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.batch.core.Job;
//import org.springframework.batch.core.JobParameters;
//import org.springframework.batch.core.launch.JobLauncher;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Date;
//import java.util.List;
//
///**
// * Person相关
// *
// * @author : qinyingjie
// * @version : 2.2.0
// * @date : 2022/12/19 16:08
// */
//@Api(description = "person用户信息", tags = "PersonController")
//@RestController
//@RequestMapping("/person")
//public class PersonController {
//
//    @Autowired
//    private JobLauncher jobLauncher;
//    @Autowired
//    private Job job;
//
//    /**
//     * {
//     * "name": "zhang san",
//     * "age": 24,
//     * "birthday": "2022-12-19"
//     * }
//     */
//    @ApiOperation(value = "json返回", notes = "json返回")
//    @GetMapping("/person")
//    public Person person() {
//        Person person = new Person();
//        person.setUsername("zhang san");
//        person.setId(24);
//        person.setAddress("湖北");
//        return person;
//    }
//
//    @GetMapping("/hello")
//    public void hello() {
//        try {
//            jobLauncher.run(job, new JobParameters());
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//}