Caused by: java.lang.NoSuchMethodException: net.ghsoft.general.modules.petition.entity.PetitionType.<init>(java.lang.String)
at java.lang.Class.getConstructor0(Class.java:3082) ~[?:1.8.0_161]
at java.lang.Class.getConstructor(Class.java:1825) ~[?:1.8.0_161]
at net.ghsoft.general.common.service.TreeService.save(TreeService.java:44) ~[classes/:?]
at net.ghsoft.general.modules.petition.service.PetitionTypeService.save(PetitionTypeService.java:35) ~[classes/:?]
at net.ghsoft.general.modules.petition.service.PetitionTypeService$$FastClassBySpringCGLIB$$8baf3673.invoke(<generated>) ~[classes/:?]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at net.ghsoft.general.modules.petition.service.PetitionTypeService$$EnhancerBySpringCGLIB$$172039ff.save(<generated>) ~[classes/:?]
at net.ghsoft.general.modules.petition.service.PetitionTypeService$$FastClassBySpringCGLIB$$8baf3673.invoke(<generated>) ~[classes/:?]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at net.ghsoft.general.modules.petition.service.PetitionTypeService$$EnhancerBySpringCGLIB$$4d6cf39f.save(<generated>) ~[classes/:?]
at net.ghsoft.general.modules.petition.web.PetitionTypeController.save(PetitionTypeController.java:75) ~[classes/:?]
... 101 more
解决方案,在实体类添加
public PetitionType() {
super();
}
public PetitionType(String id) {
super(id);
}