Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何确定由于proxyBeansMethods而导致Java Spring应用程序无法运行的问题?_Java_Spring_Spring Boot - Fatal编程技术网

如何确定由于proxyBeansMethods而导致Java Spring应用程序无法运行的问题?

如何确定由于proxyBeansMethods而导致Java Spring应用程序无法运行的问题?,java,spring,spring-boot,Java,Spring,Spring Boot,我一直在试图确定为什么我的Spring Boot应用程序无法启动。我对Spring(以及Java)非常陌生,我真的不确定如何解决这个问题。每当我尝试运行应用程序时,都会出现以下错误: org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'proxyBeanMethods' in annotation [org.springframework.boot.autoconfigure.Sprin

我一直在试图确定为什么我的Spring Boot应用程序无法启动。我对Spring(以及Java)非常陌生,我真的不确定如何解决这个问题。每当我尝试运行应用程序时,都会出现以下错误:

org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'proxyBeanMethods' in annotation [org.springframework.boot.autoconfigure.SpringBootApplication] is declared as an @AliasFor nonexistent attribute 'proxyBeanMethods' in annotation [org.springframework.context.annotation.Configuration].; nested exception is java.lang.NoSuchMethodException: org.springframework.context.annotation.Configuration.proxyBeanMethods()
    at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.<init>(AnnotationUtils.java:2166) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.from(AnnotationUtils.java:2134) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.getOtherDescriptors(AnnotationUtils.java:2298) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.getAttributeAliasNames(AnnotationUtils.java:2285) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotationUtils.getAttributeAliasNames(AnnotationUtils.java:1795) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotationUtils.getAttributeAliasMap(AnnotationUtils.java:1704) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotationUtils.postProcessAnnotationAttributes(AnnotationUtils.java:1322) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(AnnotatedElementUtils.java:365) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.core.type.StandardAnnotationMetadata.getAnnotationAttributes(StandardAnnotationMetadata.java:121) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.annotation.AnnotationConfigUtils.attributesFor(AnnotationConfigUtils.java:291) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:93) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:72) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:224) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:145) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:135) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:158) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:135) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.load(SpringApplication.java:722) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:407) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:331) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at com.codeclan.example.WhiskyTracker.WhiskyTrackerApplication.main(WhiskyTrackerApplication.java:9) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.0.5.RELEASE.jar:2.0.5.RELEASE]
Caused by: java.lang.NoSuchMethodException: org.springframework.context.annotation.Configuration.proxyBeanMethods()
    at java.base/java.lang.Class.getDeclaredMethod(Class.java:2553) ~[na:na]
    at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.<init>(AnnotationUtils.java:2159) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    ... 28 common frames omitted

Process finished with exit code 0

除非您仅限于较旧版本的Spring starter父级,否则请尝试更新到较新版本。我使用您的pom确认版本2.3.0没有此问题。您可以通过更改此pom部分来执行此操作:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.5.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

org.springframework.boot


为了避免此类问题,这里是启动Spring Java项目的好地方:


除非您仅限于Spring starter父版本的旧版本,否则请尝试更新到更新的版本。我使用您的pom确认版本2.3.0没有此问题。您可以通过更改此pom部分来执行此操作:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.5.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

org.springframework.boot


为了避免此类问题,这里是启动Spring Java项目的好地方:


我使用start.spring.io网站制作我的spring Java项目,但这个项目是我从在线课程继承下来的,我不得不自己修改它,让它做我想做的事情。无论如何,我做了更改并得到了错误警告:发生了非法的反射访问操作
,因此我可能需要暂时关闭IntelliJ,看看是否可以重新导入我的Maven依赖项。啊,我明白了,明白了。你能在你的问题中粘贴一个后续部分,包含失败的全部痕迹吗?这样的警告不会导致应用程序完全失败。好的,我现在有一个新错误。它很长,我无法在这里的评论中完全发布,但它以
org.h2.jdbc.jdbcsqlnontransionexception:General error:“java.lang.IllegalStateException:无法阅读549755823616[1.4.200/6]”[50000-200]
位置的页面开始。这是H2依赖的问题吗?是的,你明白了。听起来像是h2驱动程序的问题。如果上面的答案让你通过了这个问题的具体问题,你介意接受并发布一个新问题吗?我知道这不方便,但它会帮助别人。此外,h2问题似乎已经在这里提出:感谢您的帮助!但是我想我知道我已经打开了一个不匹配依赖项的蛇窝,为了时间起见,我可能只是从一张白板开始,然后将适当的代码复制并粘贴到正确的位置。我使用start.spring.io站点制作我的spring Java项目,但是这个项目我从我的在线课程中继承下来,我不得不自己修改它,让它做我想做的事情。无论如何,我做了更改并得到了错误警告:发生了非法的反射访问操作
,因此我可能需要暂时关闭IntelliJ,看看是否可以重新导入我的Maven依赖项。啊,我明白了,明白了。你能在你的问题中粘贴一个后续部分,包含失败的全部痕迹吗?这样的警告不会导致应用程序完全失败。好的,我现在有一个新错误。它很长,我无法在这里的评论中完全发布,但它以
org.h2.jdbc.jdbcsqlnontransionexception:General error:“java.lang.IllegalStateException:无法阅读549755823616[1.4.200/6]”[50000-200]
位置的页面开始。这是H2依赖的问题吗?是的,你明白了。听起来像是h2驱动程序的问题。如果上面的答案让你通过了这个问题的具体问题,你介意接受并发布一个新问题吗?我知道这不方便,但它会帮助别人。此外,h2问题似乎已经在这里提出:感谢您的帮助!但是我想我知道我已经打开了一个由不匹配的依赖项组成的蛇窝,为了时间起见,我可能只是从一张白板开始,然后将适当的代码复制并粘贴到正确的位置。
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.0.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>