最近做项目时,同事写的功能总是格式化时间不正确,Java类属性明明注解了@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 但就是硬生生的被格式化成了2018-03-23,原来是同事居然写了@InitBinder 1.实体类 public class WorkTodoDO implements Serializable { private static final long serialVersionUID = 1L; // 编号 pri
1.RequestBody接收json格式的数据,并直接转为对象. User.java使用lombok依赖包 @Data @AllArgsConstructor @NoArgsConstructor @ToString public class User{ private int id; private String name; } UserController.java @Controller public class UserController { @GetMapping("/testJs
参考:https://msdn.microsoft.com/en-us/library/97af8hh4.aspx 测试代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GuidToString { class Program { static void Main(string[] args) { Console.WriteLine(" -->