记录bug:Unsupported property type [java.lang.Integer] for @CreationTimestamp or @UpdateTimestamp gener

记录bug:Unsupported property type [java.lang.Integer] for @CreationTimestamp or @UpdateTimestamp gener

WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unsupported property type [java.lang.Integer] for @CreationTimestamp or @UpdateTimestamp generator annotation

原因:ELadmin自动生成的代码,不知为啥这个注解被加上了,一直没有注意到。查了一天,猛回头才发现尽然有这个注解,@UpdateTimestamp注解的问题。取消此注解即可搞定。
启示:无论哪里来的代码,都要过自己的一关,要自己审核。遇到bug后,尽量在提示中查看原因,可以尝试搜索关键字,比如这次的**@UpdateTimestamp**,有提示,但自己没看懂没理解。网上又差不多资料。纪念一下吧。 bug就是一块砖,砖多了自然就铺成了路。

记录bug:Unsupported property type [java.lang.Integer] for @CreationTimestamp or @UpdateTimestamp gener