java网站建设5-框架搭建
转载:http://www.verydemo.com/demo_c143_i2786.html
经过这几天对spring的研究,终于用spring框架搭建好项目了,用的是 spring mvc,spring依赖注入,spring dao。
用到的包有:
web.xml配置如下?:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>sss</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>pages/web/index.jsp</welcome-file> </welcome-file-list> </web-app>
....................................................................
下一步的任务是封装基类,action,dao甚至service的。
这个项目主要是锻炼下自己,把学到的知识贯穿下。
相关推荐
smalllove 2020-11-03
greensomnuss 2020-10-27
feinifi 2020-10-14
RickyIT 2020-09-27
meleto 2020-08-17
MicroBoy 2020-08-02
牧场SZShepherd 2020-07-20
容数据服务集结号 2020-07-19
与卿画眉共浮生 2020-11-13
hellowordmonkey 2020-11-02
丽丽 2020-10-30
周太郎 2020-10-28
职业炮灰 2020-10-16
与卿画眉共浮生 2020-10-14
feinifi 2020-10-13
yangjinpingc 2020-10-09
davis 2020-09-29
lisongchuang 2020-09-27