新建项目: file → New → Project…
→Web Project→ Next
→Project Name: spring (项目名)
→选中 Java EE → Finish (新建项目完成)
加入spring架包,三个主要jar包
1)\software\spring-framework--with-dependencies\spring-framework-\dist路劲下的:
2)\software\spring-framework--with-dependencies\spring-framework-\lib\mons路径下的:
commons-
3)\software\spring-framework--with-dependencies\spring-framework-\lib\log4j路径下的:
log4j-
一个配置文件:
\software\spring-framework--with-dependencies\spring-framework-\samples\jpetstore\war\WEB-INF路径下的:
其他类库
增加spring依赖库,
* SPRING_HOME/dist/
* SPRING_HOME/lib/mons-
* SPRING_HOME/lib/log4j/log4j-
如果使用了切面编程,还需下列jar文件:
lib\aspectj\
lib\cglib\cglib-nodep-
如果使用了jsr-250中的注解,还需要下列jar文件:
lib\mon-
<?xml version="" encoding="UTF-8"?>
<!--
- Application context definition for JPetStore's business layer.
- Contains bean references to the transaction manager and to the DAOs in
- essContext-local/ (see 's "contextConfigLocation").
-->
<beans xmlns="ema/beans"
xmlns:xsi="1/XMLSchema-instance"
xmlns:aop="ema/aop"
xmlns:tx="ema/tx"
xsi:schemaLocation="
ema/beans ema/beans/spring-beans-
ema/aop
spring初试 来自淘豆网m.daumloan.com转载请标明出处.