06 2019 档案

SpringBoot定时任务@Scheduled
摘要:SpringBoot定时任务主要由两个注解完成。 @Scheduled加在方法上面。 @EnableScheduling加在类上面。可以是Application类,也可以是@Component类,还可以是@Controller类等。 如下: 如果@EnableScheduling不想加在Applic 阅读全文

posted @ 2019-06-18 22:51 乐之者v 阅读(2583) 评论(0) 推荐(0)

java web开发中Servlet、Request、Response常用的代码
摘要:Request(请求) 1.获取并打印request的body中的参数。 这种获取请求中代码,一般都会封装成工具类。 如果不封装,写起来比较麻烦,类似如下: JSONObject res = new JSONObject(); String postData = null; try { postDa 阅读全文

posted @ 2019-06-08 23:02 乐之者v 阅读(565) 评论(0) 推荐(0)

导航