标签:asp jdbc ati 按钮 ase rtu beans springmvc work
使用netbeans7.4
自带的tomcat7.0
所以jdk选择7.xx
等待生成空的工程
新建web.xml
在pom.xml中添加spring的引用
1 <dependency> 2 <groupId>org.springframework</groupId> 3 <artifactId>spring-aspects</artifactId> 4 <version>4.2.0.RELEASE</version> 5 </dependency> 6 <dependency> 7 <groupId>org.springframework</groupId> 8 <artifactId>spring-context</artifactId> 9 <version>4.2.0.RELEASE</version> 10 </dependency> 11 <dependency> 12 <groupId>org.springframework</groupId> 13 <artifactId>spring-context-support</artifactId> 14 <version>4.2.0.RELEASE</version> 15 </dependency> 16 <dependency> 17 <groupId>org.springframework</groupId> 18 <artifactId>spring-expression</artifactId> 19 <version>4.2.0.RELEASE</version> 20 </dependency> 21 <dependency> 22 <groupId>org.springframework</groupId> 23 <artifactId>spring-instrument</artifactId> 24 <version>4.2.0.RELEASE</version> 25 </dependency> 26 <dependency> 27 <groupId>org.springframework</groupId> 28 <artifactId>spring-instrument-tomcat</artifactId> 29 <version>4.2.0.RELEASE</version> 30 </dependency> 31 <dependency> 32 <groupId>org.springframework</groupId> 33 <artifactId>spring-jdbc</artifactId> 34 <version>4.2.0.RELEASE</version> 35 </dependency> 36 <dependency> 37 <groupId>org.springframework</groupId> 38 <artifactId>spring-jms</artifactId> 39 <version>4.2.0.RELEASE</version> 40 </dependency> 41 <dependency> 42 <groupId>org.springframework</groupId> 43 <artifactId>spring-orm</artifactId> 44 <version>4.2.0.RELEASE</version> 45 </dependency> 46 47 <dependency> 48 <groupId>org.springframework</groupId> 49 <artifactId>spring-oxm</artifactId> 50 <version>4.2.0.RELEASE</version> 51 </dependency> 52 53 <dependency> 54 <groupId>org.springframework</groupId> 55 <artifactId>spring-test</artifactId> 56 <version>4.2.0.RELEASE</version> 57 </dependency> 58 59 <dependency> 60 <groupId>org.springframework</groupId> 61 <artifactId>spring-tx</artifactId> 62 <version>4.2.0.RELEASE</version> 63 </dependency> 64 <dependency> 65 <groupId>org.springframework</groupId> 66 <artifactId>spring-web</artifactId> 67 <version>4.2.0.RELEASE</version> 68 </dependency> 69 70 <dependency> 71 <groupId>org.springframework</groupId> 72 <artifactId>spring-webmvc</artifactId> 73 <version>4.2.0.RELEASE</version> 74 </dependency> 75 76 <dependency> 77 <groupId>org.apache.poi</groupId> 78 <artifactId>poi</artifactId> 79 <version>3.13</version> 80 </dependency> 81 <dependency> 82 <groupId>org.springframework</groupId> 83 <artifactId>spring-aop</artifactId> 84 <version>4.2.0.RELEASE</version> 85 </dependency>
然后新建spring的配置文件applicationContext
下边,,如果有按钮,根据按钮提示,添加 springframework
然后在web.xml添加spring的配置文件
<listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <!-- 指定Spring Bean的配置文件所在目录。默认配置在WEB-INF目录下 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:*applicationContext.xml</param-value> </context-param> <!--SPRING MVC 配置--> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:*spring-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/</url-pattern> <!--注意/和/*的区别--> </servlet-mapping>
使用netbeans 搭建maven工程 整合spring springmvc框架
标签:asp jdbc ati 按钮 ase rtu beans springmvc work
原文地址:https://www.cnblogs.com/jnhs/p/9938791.html