主要是这三个方面排查:

1,注入写成这样

  @Autowired 
  private BrandServiceImpl      brandServiceImpl; 

2,jar冲突,在pom.xml中

       <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                    <compilerArguments>
                        <bootclasspath>${java.home}/lib/rt.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
            </plugin>
        </plugins>

3,扫描包写的有问题

<context:component-scan  ...>

 

相关文章:

  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
相关资源
相似解决方案