springboot集成jpa但是报错

2018-02-1717:39:32.993INFO7596---[main]utoConfigurationReportLoggingInitializer:
ErrorstartingApplicationContext.Todisplaytheauto-configurationreportre-runyourapplicationwith'debug'enabled.2018-02-1717:39:33.012ERROR7596---[main]o.s.boot.SpringApplication:Applicationstartupfailed
org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'requestMappingHandlerAdapter'definedinclasspathresource[org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:Beaninstantiationviafactorymethodfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]:Factorymethod'requestMappingHandlerAdapter'threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'mvcConversionService'definedinclasspathresource[org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:Beaninstantiationviafactorymethodfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.format.support.FormattingConversionService]:Factorymethod'mvcConversionService'threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'userRepository':Invocationofinitmethodfailed;nestedexceptionisjava.lang.IllegalArgumentException:Failedtocreatequerymethodpublicabstractcom.example.demo.entity.Usercom.example.demo.dao.userRepository.findUserByNameOrEmail(java.lang.String,java.lang.String)!NopropertynamefoundfortypeUser!
atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.SpringApplication.run(SpringApplication.java:303)[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1118)[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1107)[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atcom.example.demo.DemoApplication.main(DemoApplication.java:12)[classes/:na]
Causedby:org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]:Factorymethod'requestMappingHandlerAdapter'threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'mvcConversionService'definedinclasspathresource[org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:Beaninstantiationviafactorymethodfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.format.support.FormattingConversionService]:Factorymethod'mvcConversionService'threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'userRepository':Invocationofinitmethodfailed;nestedexceptionisjava.lang.IllegalArgumentException:Failedtocreatequerymethodpublicabstractcom.example.demo.entity.Usercom.example.demo.dao.userRepository.findUserByNameOrEmail(java.lang.String,java.lang.String)!NopropertynamefoundfortypeUser!
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
...18commonframesomitted
Causedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'mvcConversionService'definedinclasspathresource[org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:Beaninstantiationviafactorymethodfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.format.support.FormattingConversionService]:Factorymethod'mvcConversionService'threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'userRepository':Invocationofinitmethodfailed;nestedexceptionisjava.lang.IllegalArgumentException:Failedtocreatequerymethodpublicabstractcom.example.demo.entity.Usercom.example.demo.dao.userRepository.findUserByNameOrEmail(java.lang.String,java.lang.String)!NopropertynamefoundfortypeUser!
atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a.mvcConversionService()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.getConfigurableWebBindingInitializer(WebMvcConfigurationSupport.java:570)~[spring-webmvc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration.getConfigurableWebBindingInitializer(WebMvcAutoConfiguration.java:432)~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.requestMappingHandlerAdapter(WebMvcConfigurationSupport.java:530)~[spring-webmvc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration.requestMappingHandlerAdapter(WebMvcAutoConfiguration.java:384)~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a.CGLIB$requestMappingHandlerAdapter$8()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a$$FastClassBySpringCGLIB$$bc1685e3.invoke()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)~[spring-core-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a.requestMappingHandlerAdapter()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_161]
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_161]
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_161]
atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_161]
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
...19commonframesomitted
Causedby:org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.format.support.FormattingConversionService]:Factorymethod'mvcConversionService'threwexception;nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'userRepository':Invocationofinitmethodfailed;nestedexceptionisjava.lang.IllegalArgumentException:Failedtocreatequerymethodpublicabstractcom.example.demo.entity.Usercom.example.demo.dao.userRepository.findUserByNameOrEmail(java.lang.String,java.lang.String)!NopropertynamefoundfortypeUser!
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
...44commonframesomitted
Causedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'userRepository':Invocationofinitmethodfailed;nestedexceptionisjava.lang.IllegalArgumentException:Failedtocreatequerymethodpublicabstractcom.example.demo.entity.Usercom.example.demo.dao.userRepository.findUserByNameOrEmail(java.lang.String,java.lang.String)!NopropertynamefoundfortypeUser!
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1086)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.data.repository.support.Repositories.cacheRepositoryFactory(Repositories.java:95)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation(Repositories.java:88)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.support.Repositories.(Repositories.java:81)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.support.DomainClassConverter.setApplicationContext(DomainClassConverter.java:98)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.web.config.SpringDataWebConfiguration.addFormatters(SpringDataWebConfiguration.java:95)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.web.servlet.config.annotation.WebMvcConfigurerComposite.addFormatters(WebMvcConfigurerComposite.java:80)~[spring-webmvc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.addFormatters(DelegatingWebMvcConfiguration.java:77)~[spring-webmvc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.mvcConversionService(WebMvcConfigurationSupport.java:598)~[spring-webmvc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a.CGLIB$mvcConversionService$35()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a$$FastClassBySpringCGLIB$$bc1685e3.invoke()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atorg.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)~[spring-core-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$6618329a.mvcConversionService()~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:1.8.0_161]
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0_161]
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0_161]
atjava.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_161]
atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
...45commonframesomitted
Causedby:java.lang.IllegalArgumentException:Failedtocreatequerymethodpublicabstractcom.example.demo.entity.Usercom.example.demo.dao.userRepository.findUserByNameOrEmail(java.lang.String,java.lang.String)!NopropertynamefoundfortypeUser!
atorg.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:76)~[spring-data-jpa-1.11.10.RELEASE.jar:na]
atorg.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:101)~[spring-data-jpa-1.11.10.RELEASE.jar:na]
atorg.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:207)~[spring-data-jpa-1.11.10.RELEASE.jar:na]
atorg.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:77)~[spring-data-jpa-1.11.10.RELEASE.jar:na]
atorg.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.(RepositoryFactorySupport.java:449)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:222)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:277)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:263)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:101)~[spring-data-jpa-1.11.10.RELEASE.jar:na]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
...70commonframesomitted
Causedby:org.springframework.data.mapping.PropertyReferenceException:NopropertynamefoundfortypeUser!
atorg.springframework.data.mapping.PropertyPath.(PropertyPath.java:77)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:329)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.mapping.PropertyPath.create(PropertyPath.java:309)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.mapping.PropertyPath.from(PropertyPath.java:272)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.mapping.PropertyPath.from(PropertyPath.java:243)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.query.parser.Part.(Part.java:76)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.query.parser.PartTree$OrPart.(PartTree.java:247)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:398)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.query.parser.PartTree$Predicate.(PartTree.java:378)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.repository.query.parser.PartTree.(PartTree.java:89)~[spring-data-commons-1.13.10.RELEASE.jar:na]
atorg.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:70)~[spring-data-jpa-1.11.10.RELEASE.jar:na]
...80commonframesomitted
贴上我的spring配置文件
spring.datasource.url=jdbc:mysql://localhost:3306/boot?useUnicode=true&characterEncoding=utf-8spring.datasource.username=rootspring.datasource.password=rootspring.datasoruce.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.hbm2ddl.autu=updatespring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialectspring.jpa.show-sql=true
拉风的咖菲猫
浏览 298回答 2
2回答

SMILET

Causedby:org.springframework.data.mapping.PropertyReferenceException:NopropertynamefoundfortypeUser!实体User没有定义name属性。

潇潇雨雨

问题的实际是我在定义接口的时候直接定义了findUserNameByName,但是我user里并没有定义name这个属性,定义的是userName,把接口的名字改为findUserNameByuserName就好了
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript