您好,从2.0升级到2.2,发现了程序兼容问题。
2016-11-30 14:43:38 [ nioEventLoopGroup-6-1:315021 ] - [ ERROR ] JSON IO:No serializer found for class com.noboup.korm.model.TeacherBase and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["data"]->java.util.ArrayList[0])
com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class com.noboup.korm.model.TeacherBase and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["data"]->java.util.ArrayList[0])
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:69)
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:32)
me.seJsonFactory(new FastJsonFactory())
别忘了添加 fastjson 的一个 jar 包进去,在首页有jfinal all zip 下载,里面包括所有 jar 包