运行项目报错

1、问题

D:\jdk\jdk1.8.0_144\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:D:\java\java_idea\ideaIU-2020.1.win\lib\idea_rt.jar=63843:D:\java\java_idea\ideaIU-2020.1.win\bin -Dfile.encoding=UTF-8 -classpath D:\jdk\jdk1.8.0_144\jre\lib\charsets.jar;D:\jdk\jdk1.8.0_144\jre\lib\deploy.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\access-bridge-64.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\cldrdata.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\dnsns.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\jaccess.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\jfxrt.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\localedata.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\nashorn.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\sunec.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\sunjce_provider.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\sunmscapi.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\sunpkcs11.jar;D:\jdk\jdk1.8.0_144\jre\lib\ext\zipfs.jar;D:\jdk\jdk1.8.0_144\jre\lib\javaws.jar;D:\jdk\jdk1.8.0_144\jre\lib\jce.jar;D:\jdk\jdk1.8.0_144\jre\lib\jfr.jar;D:\jdk\jdk1.8.0_144\jre\lib\jfxswt.jar;D:\jdk\jdk1.8.0_144\jre\lib\jsse.jar;D:\jdk\jdk1.8.0_144\jre\lib\management-agent.jar;D:\jdk\jdk1.8.0_144\jre\lib\plugin.jar;D:\jdk\jdk1.8.0_144\jre\lib\resources.jar;D:\jdk\jdk1.8.0_144\jre\lib\rt.jar;D:\java\workspace_idea_iu\sell\target\classes;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-web\2.2.6.RELEASE\spring-boot-starter-web-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter\2.2.6.RELEASE\spring-boot-starter-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot\2.2.6.RELEASE\spring-boot-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-autoconfigure\2.2.6.RELEASE\spring-boot-autoconfigure-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-logging\2.2.6.RELEASE\spring-boot-starter-logging-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\java\java_idea\0418\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\java\java_idea\0418\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;D:\java\java_idea\0418\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;D:\java\java_idea\0418\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\java\java_idea\0418\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\java\java_idea\0418\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-json\2.2.6.RELEASE\spring-boot-starter-json-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\com\fasterxml\jackson\core\jackson-databind\2.10.3\jackson-databind-2.10.3.jar;D:\java\java_idea\0418\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.3\jackson-annotations-2.10.3.jar;D:\java\java_idea\0418\repository\com\fasterxml\jackson\core\jackson-core\2.10.3\jackson-core-2.10.3.jar;D:\java\java_idea\0418\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.3\jackson-datatype-jdk8-2.10.3.jar;D:\java\java_idea\0418\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.3\jackson-datatype-jsr310-2.10.3.jar;D:\java\java_idea\0418\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.3\jackson-module-parameter-names-2.10.3.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-tomcat\2.2.6.RELEASE\spring-boot-starter-tomcat-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.33\tomcat-embed-core-9.0.33.jar;D:\java\java_idea\0418\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.33\tomcat-embed-el-9.0.33.jar;D:\java\java_idea\0418\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.33\tomcat-embed-websocket-9.0.33.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-validation\2.2.6.RELEASE\spring-boot-starter-validation-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;D:\java\java_idea\0418\repository\org\hibernate\validator\hibernate-validator\6.0.18.Final\hibernate-validator-6.0.18.Final.jar;D:\java\java_idea\0418\repository\org\springframework\spring-web\5.2.5.RELEASE\spring-web-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-beans\5.2.5.RELEASE\spring-beans-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-webmvc\5.2.5.RELEASE\spring-webmvc-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-aop\5.2.5.RELEASE\spring-aop-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-context\5.2.5.RELEASE\spring-context-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-expression\5.2.5.RELEASE\spring-expression-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\java\java_idea\0418\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;D:\java\java_idea\0418\repository\net\bytebuddy\byte-buddy\1.10.8\byte-buddy-1.10.8.jar;D:\java\java_idea\0418\repository\org\springframework\spring-core\5.2.5.RELEASE\spring-core-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-jcl\5.2.5.RELEASE\spring-jcl-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\mysql\mysql-connector-java\8.0.19\mysql-connector-java-8.0.19.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.2.6.RELEASE\spring-boot-starter-data-jpa-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-aop\2.2.6.RELEASE\spring-boot-starter-aop-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\aspectj\aspectjweaver\1.9.5\aspectjweaver-1.9.5.jar;D:\java\java_idea\0418\repository\org\springframework\boot\spring-boot-starter-jdbc\2.2.6.RELEASE\spring-boot-starter-jdbc-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\com\zaxxer\HikariCP\3.4.2\HikariCP-3.4.2.jar;D:\java\java_idea\0418\repository\org\springframework\spring-jdbc\5.2.5.RELEASE\spring-jdbc-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;D:\java\java_idea\0418\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;D:\java\java_idea\0418\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;D:\java\java_idea\0418\repository\org\hibernate\hibernate-core\5.4.12.Final\hibernate-core-5.4.12.Final.jar;D:\java\java_idea\0418\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;D:\java\java_idea\0418\repository\org\javassist\javassist\3.24.0-GA\javassist-3.24.0-GA.jar;D:\java\java_idea\0418\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\java\java_idea\0418\repository\org\jboss\jandex\2.1.1.Final\jandex-2.1.1.Final.jar;D:\java\java_idea\0418\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\java\java_idea\0418\repository\org\dom4j\dom4j\2.1.1\dom4j-2.1.1.jar;D:\java\java_idea\0418\repository\org\hibernate\common\hibernate-commons-annotations\5.1.0.Final\hibernate-commons-annotations-5.1.0.Final.jar;D:\java\java_idea\0418\repository\org\glassfish\jaxb\jaxb-runtime\2.3.2\jaxb-runtime-2.3.2.jar;D:\java\java_idea\0418\repository\org\glassfish\jaxb\txw2\2.3.2\txw2-2.3.2.jar;D:\java\java_idea\0418\repository\com\sun\istack\istack-commons-runtime\3.0.8\istack-commons-runtime-3.0.8.jar;D:\java\java_idea\0418\repository\org\jvnet\staxex\stax-ex\1.8.1\stax-ex-1.8.1.jar;D:\java\java_idea\0418\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.16\FastInfoset-1.2.16.jar;D:\java\java_idea\0418\repository\org\springframework\data\spring-data-jpa\2.2.6.RELEASE\spring-data-jpa-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\data\spring-data-commons\2.2.6.RELEASE\spring-data-commons-2.2.6.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-orm\5.2.5.RELEASE\spring-orm-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-tx\5.2.5.RELEASE\spring-tx-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\springframework\spring-aspects\5.2.5.RELEASE\spring-aspects-5.2.5.RELEASE.jar;D:\java\java_idea\0418\repository\org\projectlombok\lombok\1.18.12\lombok-1.18.12.jar com.imooc.SellApplication

 

  .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::        (v2.2.6.RELEASE)

 

2020-05-16 18:25:58,467-Starting SellApplication on ming-PC with PID 4380 (D:\java\workspace_idea_iu\sell\target\classes started by ming in D:\java\workspace_idea_iu\sell)

2020-05-16 18:25:58,473-No active profile set, falling back to default profiles: default

2020-05-16 18:26:00,252-Bootstrapping Spring Data JPA repositories in DEFAULT mode.

2020-05-16 18:26:00,454-Finished Spring Data repository scanning in 178ms. Found 4 JPA repository interfaces.

2020-05-16 18:26:01,619-Tomcat initialized with port(s): 8080 (http)

2020-05-16 18:26:01,637-Initializing ProtocolHandler ["http-nio-8080"]

2020-05-16 18:26:01,638-Starting service [Tomcat]

2020-05-16 18:26:01,639-Starting Servlet engine: [Apache Tomcat/9.0.33]

2020-05-16 18:26:01,876-Initializing Spring embedded WebApplicationContext

2020-05-16 18:26:01,877-Root WebApplicationContext: initialization completed in 3276 ms

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

2020-05-16 18:26:02,191-HikariPool-1 - Starting...

2020-05-16 18:26:02,194-Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.

2020-05-16 18:26:02,454-HikariPool-1 - Start completed.

2020-05-16 18:26:02,809-HHH000204: Processing PersistenceUnitInfo [name: default]

2020-05-16 18:26:03,075-HHH000412: Hibernate ORM core version 5.4.12.Final

2020-05-16 18:26:03,359-HCANN000001: Hibernate Commons Annotations {5.1.0.Final}

2020-05-16 18:26:03,618-HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect

2020-05-16 18:26:05,066-HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]

2020-05-16 18:26:05,084-Initialized JPA EntityManagerFactory for persistence unit 'default'

2020-05-16 18:26:05,945-spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2020-05-16 18:26:06,139-Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Unsatisfied dependency expressed through method 'requestMappingHandlerAdapter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Unsatisfied dependency expressed through method 'requestMappingHandlerAdapter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

2020-05-16 18:26:06,140-Closing JPA EntityManagerFactory for persistence unit 'default'

2020-05-16 18:26:06,144-HikariPool-1 - Shutdown initiated...

2020-05-16 18:26:06,190-HikariPool-1 - Shutdown completed.

2020-05-16 18:26:06,194-Stopping service [Tomcat]

2020-05-16 18:26:06,222-

 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2020-05-16 18:26:06,248-Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Unsatisfied dependency expressed through method 'requestMappingHandlerAdapter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)

at com.imooc.SellApplication.main(SellApplication.java:10)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210)

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885)

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789)

... 19 common frames omitted

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)

... 33 common frames omitted

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)

at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1114)

at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory(Repositories.java:99)

at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation(Repositories.java:92)

at org.springframework.data.repository.support.Repositories.(Repositories.java:85)

at org.springframework.data.repository.support.DomainClassConverter.setApplicationContext(DomainClassConverter.java:109)

at org.springframework.data.web.config.SpringDataWebConfiguration.addFormatters(SpringDataWebConfiguration.java:131)

at org.springframework.web.servlet.config.annotation.WebMvcConfigurerComposite.addFormatters(WebMvcConfigurerComposite.java:81)

at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.addFormatters(DelegatingWebMvcConfiguration.java:78)

at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.mvcConversionService(WebMvcAutoConfiguration.java:430)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)

... 34 common frames omitted

Caused by: java.lang.IllegalArgumentException: Failed to create query for method public abstract org.springframework.data.domain.Page com.imooc.repository.OrderMasterRepository.findByBuyerOpenid(java.lang.String,org.springframework.data.domain.Pageable)! No property buyerOpenid found for type OrderMaster!

at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:96)

at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:103)

at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:209)

at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:78)

at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lookupQuery(RepositoryFactorySupport.java:574)

at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$mapMethodsToQuery$1(RepositoryFactorySupport.java:567)

at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)

at java.util.Iterator.forEachRemaining(Iterator.java:116)

at java.util.Collections$UnmodifiableCollection$1.forEachRemaining(Collections.java:1049)

at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)

at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.mapMethodsToQuery(RepositoryFactorySupport.java:569)

at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$new$0(RepositoryFactorySupport.java:559)

at java.util.Optional.map(Optional.java:215)

at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.(RepositoryFactorySupport.java:559)

at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:332)

at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297)

at org.springframework.data.util.Lazy.getNullable(Lazy.java:212)

at org.springframework.data.util.Lazy.get(Lazy.java:94)

at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300)

at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:121)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)

... 54 common frames omitted

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property buyerOpenid found for type OrderMaster!

at org.springframework.data.mapping.PropertyPath.(PropertyPath.java:94)

at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:382)

at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358)

at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:311)

at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)

at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:293)

at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:276)

at org.springframework.data.repository.query.parser.Part.(Part.java:82)

at org.springframework.data.repository.query.parser.PartTree$OrPart.lambda$new$0(PartTree.java:251)

at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)

at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

at org.springframework.data.repository.query.parser.PartTree$OrPart.(PartTree.java:252)

at org.springframework.data.repository.query.parser.PartTree$Predicate.lambda$new$0(PartTree.java:381)

at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)

at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)

at org.springframework.data.repository.query.parser.PartTree$Predicate.(PartTree.java:382)

at org.springframework.data.repository.query.parser.PartTree.(PartTree.java:97)

at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.(PartTreeJpaQuery.java:89)

... 80 common frames omitted

 

Process finished with exit code 1

 

2、原因:

运行项目报错_第1张图片

 

3、解决:

运行项目报错_第2张图片

 

你可能感兴趣的:(bug,bug)