Transformers.ALIAS_TO_ENTITY_MAP与Transformers.aliasToBean(HashMap.class)

时间:2024-03-27 21:42:03

e Exception Report

Message org.hibernate.PropertyNotFoundException: Could not resolve PropertyAccess for num on class java.util.HashMap

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.persistence.PersistenceException: org.hibernate.PropertyNotFoundException: Could not resolve PropertyAccess for num on class java.util.HashMap
        org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)

原代码:(通过设置返回的格式为map   出错)

Transformers.ALIAS_TO_ENTITY_MAP与Transformers.aliasToBean(HashMap.class)

改为:

Transformers.ALIAS_TO_ENTITY_MAP与Transformers.aliasToBean(HashMap.class)

问题解决!!