mufengforward

1. 导入,部署: https://blog.csdn.net/u010570551/article/details/51510447

 

2. idea导入MyEclipse Web项目时,服务器搭建运行正常,但无法访问WebRoot下的页面 : https://blog.csdn.net/qq_38887189/article/details/74790622

 

3. idea中运行项目时报错:java.lang.NumberFormatException: For input string: "${jdbc.initialSize}",此项目中,父模块中有四个子模块,共用一个父模块中的数据库资源文件

    

  原因:spring-mybatis.xml配置文件解析失败:其中引入的资源文件引入失败,所以"${jdbc.initialSize}"没有正确解析,而是以"${jdbc.initialSize}"字符串的形式(检查编译过后的此文件可以看出),故解析时无法转为number,正如报错信息

  检查:(1)配置文件中资源文件的引入:

         <!-- 读取配置文件信息 -->
          <context:property-placeholder ignore-unresolvable="true" location="classpath:*.properties"/> 

 

     (2)父子模块间的依赖关系是否建立:

            父模块poom中:
        <modules>
            <module>ssm-common</module>
            <module>ssm-mds</module>
            <module>ssm-web-app</module>
            <module>ssm-web-admin</module>
        </modules>
          子模块poom中:
       <parent>
            <artifactId>ssm</artifactId>
            <groupId>com.ssm</groupId>
            <version>1.0-SNAPSHOT</version>
       </parent>            

 

     (3)idea的maven项目是否导入更新:点击更新    然后重新运行,发现成功运行,检查编译过后的配置文件,发现成功解析;

            

 

分类:

技术点:

相关文章:

  • 2022-01-17
  • 2021-05-21
  • 2021-08-26
  • 2021-07-08
  • 2021-08-14
  • 2021-11-28
  • 2021-08-16
  • 2021-08-01
猜你喜欢
  • 2022-01-20
  • 2021-09-24
  • 2021-09-02
  • 2021-11-07
  • 2021-12-10
  • 2022-01-08
  • 2022-02-08
相关资源
相似解决方案