Occurrence condition:
Increase the dependency of dev-tools in Pom.xml, after the program starts, the calling program interface error
Problem phenomenon:
-------------------------------------------------------------Registered concrete Types:5(Approximate size:630.7KB) [InterfaceJava.util.Collection]: arraylist<object> [InterfaceJAVA.UTIL.MAP]: Linkedhashmap<object, object> [InterfaceJava.util.map$entry]: Mapentry<object, object> [InterfaceJava.util.Set]: linkedhashset<object> [InterfaceJava.util.List]: arraylist<object>-------------------------------------------------------------Resolved Strategies:1(Approximate size: the,825.6KB) {source:apporganization, dest:apporganizationdto,inch-place:false}: Instantiateandusecustommapperstrategy<apporganization, apporganizationdto> {customMapper: [email protected ], unenhancer: [email protected], objectfactory:defaultconstructorobjectfactory<apporganizationdto>}-------------------------------------------------------------unenhance Strategy: [email protected]-----End dump of current state-------------------------------At ma.glasnost.orika.impl.ExceptionUtility.newMappingException (Exceptionutility.java: -) at Ma.glasnost.orika.impl.MapperFacadeImpl.map (Mapperfacadeimpl.java:752) at Ma.glasnost.orika.impl.MapperFacadeImpl.map (Mapperfacadeimpl.java:721)
Cause of the problem:
Looks like a Orika bug.
Solution:
(Refer to Https://stackoverflow.com/questions/33324944/orika-classcastexception-in-spring-boot-webapp):
- Create a
META-INF
folder in src/main/resources
.
- Create
spring-devtools.properties
file in it.
- Add to the
restart.include.orika=/orika-core.*\.jar
file.
[After resolving]springboot added Dev-tools, run the program error unenhance strategy