xxxRepository報異常

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘commentServiceImpl’: Unsatisfied dependency expressed through field ‘commentRepository’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘commentRepository’: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.lrm.dao.CommentRepository.findByBlogIdAAndParentCommentNull(java.lang.Long,org.springframework.data.domain.Sort)! No property a found for type Long! Traversed path: Comment.blog.id.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.lambdaAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBean0(AbstractBeanFactory.java:323) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) [springcontext5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) [springcontext5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [springboot2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)[springboot2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)[springboot2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:315)[springboot2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1226)[springboot2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1215)[springboot2.2.6.RELEASE.jar:2.2.6.RELEASE]atcom.lrm.BlgApplication.main(BlgApplication.java:10)[classes/:na]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [na:1.8.0131]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0131]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0131]atjava.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0131]atorg.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)[springbootdevtools2.2.6.RELEASE.jar:2.2.6.RELEASE]Causedby:org.springframework.beans.factory.BeanCreationException:ErrorcreatingbeanwithnamecommentRepository:Invocationofinitmethodfailed;nestedexceptionisjava.lang.IllegalArgumentException:Failedtocreatequeryformethodpublicabstractjava.util.Listcom.lrm.dao.CommentRepository.findByBlogIdAAndParentCommentNull(java.lang.Long,org.springframework.data.domain.Sort)!NopropertyafoundfortypeLong!Traversedpath:Comment.blog.id.atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.lambda0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at com.lrm.BlgApplication.main(BlgApplication.java:10) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.6.RELEASE.jar:2.2.6.RELEASE] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commentRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.lrm.dao.CommentRepository.findByBlogIdAAndParentCommentNull(java.lang.Long,org.springframework.data.domain.Sort)! No property a found for type Long! Traversed path: Comment.blog.id. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBean0(AbstractBeanFactory.java:323) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
… 24 common frames omitted
Caused by: java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.lrm.dao.CommentRepository.findByBlogIdAAndParentCommentNull(java.lang.Long,org.springframework.data.domain.Sort)! No property a found for type Long! Traversed path: Comment.blog.id.
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:96) ~[spring-data-jpa-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategyCreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:103) [springdatajpa2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.jpa.repository.query.JpaQueryLookupStrategyCreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:103) ~[spring-data-jpa-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategyCreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:209) ~[spring-data-jpa-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategyAbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:78) [springdatajpa2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.repository.core.support.RepositoryFactorySupportAbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:78) ~[spring-data-jpa-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactorySupportQueryExecutorMethodInterceptor.lookupQuery(RepositoryFactorySupport.java:574) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupportQueryExecutorMethodInterceptor.lambdaQueryExecutorMethodInterceptor.lambdamapMethodsToQuery$1(RepositoryFactorySupport.java:567) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at java.util.stream.ReferencePipeline$31.accept(ReferencePipeline.java:193) [na:1.8.0131]atjava.util.Iterator.forEachRemaining(Iterator.java:116) [na:1.8.0131]atjava.util.Collections1.accept(ReferencePipeline.java:193) ~[na:1.8.0_131] at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_131] at java.util.CollectionsUnmodifiableCollection1.forEachRemaining(Collections.java:1049) [na:1.8.0131]atjava.util.Spliterators1.forEachRemaining(Collections.java:1049) ~[na:1.8.0_131] at java.util.SpliteratorsIteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_131]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_131]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_131]
at java.util.stream.ReduceOpsReduceOp.evaluateSequential(ReduceOps.java:708) [na:1.8.0131]atjava.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [na:1.8.0131]atjava.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) [na:1.8.0131]atorg.springframework.data.repository.core.support.RepositoryFactorySupportReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_131] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_131] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_131] at org.springframework.data.repository.core.support.RepositoryFactorySupportQueryExecutorMethodInterceptor.mapMethodsToQuery(RepositoryFactorySupport.java:569) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupportQueryExecutorMethodInterceptor.lambdaQueryExecutorMethodInterceptor.lambdanew0(RepositoryFactorySupport.java:559) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atjava.util.Optional.map(Optional.java:215) [na:1.8.0131]atorg.springframework.data.repository.core.support.RepositoryFactorySupport0(RepositoryFactorySupport.java:559) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_131] at org.springframework.data.repository.core.support.RepositoryFactorySupportQueryExecutorMethodInterceptor.(RepositoryFactorySupport.java:559) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:332) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet5(RepositoryFactoryBeanSupport.java:297) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.util.Lazy.getNullable(Lazy.java:212) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.util.Lazy.get(Lazy.java:94) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:121) [springdatajpa2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) [springbeans5.2.5.RELEASE.jar:5.2.5.RELEASE]...34commonframesomittedCausedby:org.springframework.data.mapping.PropertyReferenceException:NopropertyafoundfortypeLong!Traversedpath:Comment.blog.id.atorg.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:94) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:382) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:392) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:392) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.lambda5(RepositoryFactoryBeanSupport.java:297) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.util.Lazy.getNullable(Lazy.java:212) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.util.Lazy.get(Lazy.java:94) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:121) ~[spring-data-jpa-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE] ... 34 common frames omitted Caused by: org.springframework.data.mapping.PropertyReferenceException: No property a found for type Long! Traversed path: Comment.blog.id. at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:94) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:382) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:392) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:392) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.lambdafrom0(PropertyPath.java:311) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atjava.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324) [na:1.8.0131]atorg.springframework.data.mapping.PropertyPath.from(PropertyPath.java:293) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.mapping.PropertyPath.from(PropertyPath.java:276) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.repository.query.parser.Part.<init>(Part.java:82) [springdatacommons2.2.6.RELEASE.jar:2.2.6.RELEASE]atorg.springframework.data.repository.query.parser.PartTree0(PropertyPath.java:311) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324) ~[na:1.8.0_131] at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:293) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:276) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.repository.query.parser.Part.<init>(Part.java:82) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.data.repository.query.parser.PartTreeOrPart.lambda$new$0(PartTree.java:251) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_131]
at java.util.stream.ReferencePipeline$21.accept(ReferencePipeline.java:175) [na:1.8.0131]atjava.util.Spliterators1.accept(ReferencePipeline.java:175) ~[na:1.8.0_131] at java.util.SpliteratorsArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_131]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_131]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_131]
at java.util.stream.ReduceOpsReduceOp.evaluateSequential(ReduceOps.java:708) [na:1.8.0131]atjava.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [na:1.8.0131]atjava.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) [na:1.8.0131]atorg.springframework.data.repository.query.parser.PartTreeReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_131] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_131] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_131] at org.springframework.data.repository.query.parser.PartTreeOrPart.(PartTree.java:252) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.repository.query.parser.PartTreePredicate.lambdaPredicate.lambdanew$0(PartTree.java:381) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_131]
at java.util.stream.ReferencePipeline$21.accept(ReferencePipeline.java:175) [na:1.8.0131]atjava.util.Spliterators1.accept(ReferencePipeline.java:175) ~[na:1.8.0_131] at java.util.SpliteratorsArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_131]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_131]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_131]
at java.util.stream.ReduceOpsReduceOp.evaluateSequential(ReduceOps.java:708) [na:1.8.0131]atjava.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [na:1.8.0131]atjava.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) [na:1.8.0131]atorg.springframework.data.repository.query.parser.PartTreeReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_131] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_131] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_131] at org.springframework.data.repository.query.parser.PartTreePredicate.(PartTree.java:382) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.repository.query.parser.PartTree.(PartTree.java:97) ~[spring-data-commons-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:89) ~[spring-data-jpa-2.2.6.RELEASE.jar:2.2.6.RELEASE]
… 60 common frames omitted

解決辦法:
Respository沒有找到該參數
1)由該參數,函數名寫錯,不符合JPA規範
2)實體類沒有該參數

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章