Takagi 我看了日志,因为主题数据重复插入数据库的问题导致的。删了之后就可以,不清楚为啥。。
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:385) ~[spring-orm-5.3.4.jar:5.3.4]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:235) ~[spring-orm-5.3.4.jar:5.3.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551) ~[spring-orm-5.3.4.jar:5.3.4]
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.3.4.jar:5.3.4]
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.3.4.jar:5.3.4]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152) ~[spring-tx-5.3.4.jar:5.3.4]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.4.jar:5.3.4]
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:145) ~[spring-data-jpa-2.5.0-M4.jar:2.5.0-M4]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.4.jar:5.3.4]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.4.jar:5.3.4]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.4.jar:5.3.4]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.4.jar:5.3.4]
at com.sun.proxy.$Proxy171.findByThemeIdAndKey(Unknown Source) ~[na:na]
at run.halo.app.service.impl.ThemeSettingServiceImpl.save(ThemeSettingServiceImpl.java:65) ~[classes/:1.4.7]
at run.halo.app.service.impl.ThemeSettingServiceImpl.lambda$save$3(ThemeSettingServiceImpl.java:115) ~[classes/:1.4.7]
at java.base/java.util.LinkedHashMap.forEach(Unknown Source) ~[na:na]
at run.halo.app.service.impl.ThemeSettingServiceImpl.save(ThemeSettingServiceImpl.java:115) ~[classes/:1.4.7]
at run.halo.app.service.impl.ThemeSettingServiceImpl$$FastClassBySpringCGLIB$$f53155.invoke(<generated>) ~[classes/:1.4.7]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~