Java搭建springMVC项目笔记

MyEclipse搭建项目

1
2
3
4
5
...
nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
...
nested exception is java.lang.IllegalArgumentException
...

解决方法:
在项目上右键–properties–java Compile–compiler compliance level

在工程目录下添加config文件夹,下面添加文件:jdbc.properties,spring-mvc.xml,spring-mybatis.xml
spring-config

  • jdbc.properties:mysql配置
  • spring-mvc.xml
    • context -> base-package: 包的跟路径
    • bean -> prefix: /WEB-INF/page/下放.jsp文件
      mvc -> bean: utl 的根路径
    • spring-mybatis.xml:
      • context -> base-package: 包的根路径
      • bean -> base-package: dao的根路径
      • aop -> expression: service的根路径
-------------本文结束感谢您的阅读-------------