将maven项目转化成web 项目的过程中,出现了许多问题,下面进行总结,首先是tomcat问题,tomcat的配置,如果在eclipse中开启了tomcat,页面无法展示,此时是环境路径配置不对,应该在eclipse中配置tomcat的路径,如果发布的项目报错为ERROR DispatcherServlet - Context initialization failedorg.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file,此时说明用户的spring-web包版本过低导致,需要升级该包

解决example:

 <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.3.2.RELEASE</version>
    </dependency>

如果在部署项目过程中java resource报错,但是类没错,此时问题有两种可能,第一是jdk需要重新选择,compile和maven中project facts两个地方,如果还报错,就是maven的jar没有关联

你需要设置一下eclipse:
项目 —> 属性 -> Deployment Assembly -> Add -> Java Build Path Entries -> 选择Maven Dependencies -> Finish -> OK

 

相关文章:

  • 2022-01-11
  • 2022-01-18
  • 2022-12-23
  • 2021-08-22
  • 2022-02-11
  • 2021-07-26
  • 2022-01-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-07-13
相关资源
相似解决方案