| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | return R.data(subject); |
| | | } |
| | | |
| | | /** |
| | | * 返回当前时间 |
| | | */ |
| | | @GetMapping("/getdate") |
| | | @ApiOperationSupport(order = 9) |
| | | public R getdate() { |
| | | Date date = new Date(); |
| | | String strDateFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat); |
| | | System.out.println(sdf.format(date)); |
| | | return R.data(sdf.format(date)); |
| | | } |
| | | |
| | | } |