proxyBeanMthods annotation error when running springboot application

前端 未结 4 1296
长情又很酷
长情又很酷 2021-01-21 21:45

I am trying to run my first springboot application but facing some issues.

In my application file, this is my code

package com.clog.ServiceMgmt;

import         


        
相关标签:
4条回答
  • 2021-01-21 22:21

    Had same problem few days ago. Try to change spring-boot-starter-parent version to 2.1.3.RELEASE, thats resolved my problem.

    0 讨论(0)
  • 2021-01-21 22:32

    I removed the following dependency

    <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot</artifactId>
                <version>2.2.1.RELEASE</version>
    </dependency>
    

    And the code was up like magic

    0 讨论(0)
  • 2021-01-21 22:38

    I had this error happen in a Spring Boot project where I added a custom dependency that made use of Spring (not Spring Boot). The issue in my custom dependency was that it had the following plugin configuration:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.4.3</version>
        <executions>
            <execution>
                <phase>package</phase>
    
                <goals>
                    <goal>shade</goal>
                </goals>
    
                <configuration>
                    <transformers>
                        <transformer
    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                            <mainClass>com.example.Main</mainClass>
                            <manifestEntries>
                                <Implementation-Title>${project.name}</Implementation-Title>
                                <Implementation-Version>${project.version}</Implementation-Version>
                                <Implementation-Vendor>Vendor Name, ${timestamp}</Implementation-Vendor>
                            </manifestEntries>
                        </transformer>
                    </transformers>
    
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
            </execution>
        </executions>
    </plugin>
    

    Once I removed the shade plugin from my custom dependency, the error disappeared.

    0 讨论(0)
  • 2021-01-21 22:41

    from spring-projects-github

    " proxyBeanMethods is new in 5.2 and I can see 5.1.2.RELEASE in some elements of the stack."

    do a dependency:tree and double check that spring match >= 5.2, I had a similar issue and one library brought 5.1 overriding v5.2 from springboot

    0 讨论(0)
提交回复
热议问题