<html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Tue Jul 09 09:31:20 CST 2019</div><div>There was an unexpected error (type=Internal Server Error, status=500).</div><div>Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.jpadata.entity.User$HibernateProxy$W5saRQuh["hibernateLazyInitializer"])</div></body></html>
这个错误的解决方案: JsonIgnoreProperties({"hibernateLazyInitializer","handler"})//添加这一行
@Table(name = "tbl_user")//可以省略 public class User {
[@Id](https://my.oschina.net/u/3451001)@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@Column(name = "last_name",length = 50)
private String lastName;
@Column //省略的写法
private String email;
//下面这篇博客解释了原因
http://jingpin.jikexueyuan.com/article/43050.html
来源:oschina
链接:https://my.oschina.net/u/2511906/blog/3071339