当前位置: 首页 > news >正文

航达建设集团有限公司网站wordpress怎么降级

航达建设集团有限公司网站,wordpress怎么降级,asp.net 手机网站模板,沈阳男科医院哪家好点文章出处#xff1a;课程资料 web.xml等配置文件的解释#xff1a;打开博客 为了更好的学习 springmvc和mybatis整合开发的方法#xff0c;需要将springmvc和mybatis进行整合。 整合目标#xff1a;控制层采用springmvc、持久层使用mybatis实现。 步骤详解#xff1a; …文章出处课程资料 web.xml等配置文件的解释打开博客 为了更好的学习 springmvc和mybatis整合开发的方法需要将springmvc和mybatis进行整合。 整合目标控制层采用springmvc、持久层使用mybatis实现。 步骤详解 创建数据库表 需要的jar包 spring包括springmvcmybatismybatis-spring整合包数据库驱动第三方连接池。 整合思路 Dao层 1、SqlMapConfig.xml空文件即可但是需要文件头。 2、applicationContext-dao.xml 数据库连接池 b) SqlSessionFactory对象需要spring和mybatis整合包下的。 c) 配置mapper文件扫描器。 Service层 1、applicationContext-service.xml包扫描器扫描service注解的类。 2、applicationContext-trans.xml配置事务。 Controller层 1、Springmvc.xml a) 包扫描器扫描Controller注解的类。 b) 配置注解驱动 c) 配置视图解析器 Web.xml文件 1、配置spring 2、配置前端控制器。 创建工程 创建动态web工程springmvc-web选2.5可以自动生成web.xml 加入jar包 复制jar包到/WEB-INF/lib中 工程自动加载jar包 加入配置文件 创建资源文件夹config 在其下创建mybatis和spring文件夹用来存放配置文件如下图 sqlMapConfig.xml 使用逆向工程来生成Mapper相关代码不需要配置别名。 在config/mybatis下创建SqlMapConfig.xml ?xml version1.0 encodingUTF-8? !DOCTYPE configuration PUBLIC -//mybatis.org//DTD Config 3.0//EN http://mybatis.org/dtd/mybatis-3-config.dtd configuration/configurationapplicationContext-dao.xml 配置数据源、配置SqlSessionFactory、mapper扫描器。 ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:contexthttp://www.springframework.org/schema/context xmlns:phttp://www.springframework.org/schema/pxmlns:aophttp://www.springframework.org/schema/aop xmlns:txhttp://www.springframework.org/schema/txxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsdhttp://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd!-- 加载配置文件 --context:property-placeholder locationclasspath:db.properties /!-- 数据库连接池 --bean iddataSource classorg.apache.commons.dbcp.BasicDataSourcedestroy-methodcloseproperty namedriverClassName value${jdbc.driver} /property nameurl value${jdbc.url} /property nameusername value${jdbc.username} /property namepassword value${jdbc.password} /property namemaxActive value10 /property namemaxIdle value5 //bean!-- 配置SqlSessionFactory --bean idsqlSessionFactory classorg.mybatis.spring.SqlSessionFactoryBean!-- 数据库连接池 --property namedataSource refdataSource /!-- 加载mybatis的全局配置文件 --property nameconfigLocation valueclasspath:mybatis/SqlMapConfig.xml //bean!-- 配置Mapper扫描 --bean classorg.mybatis.spring.mapper.MapperScannerConfigurer!-- 配置Mapper扫描包 --property namebasePackage valuecn.itcast.ssm.mapper //bean/beansdb.properties 配置数据库相关信息 jdbc.drivercom.mysql.jdbc.Driver jdbc.urljdbc:mysql://localhost:3306/springmvc?characterEncodingutf-8 jdbc.usernameroot jdbc.passwordrootapplicationContext-service.xml ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:contexthttp://www.springframework.org/schema/context xmlns:phttp://www.springframework.org/schema/pxmlns:aophttp://www.springframework.org/schema/aop xmlns:txhttp://www.springframework.org/schema/txxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsdhttp://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd!-- 配置service扫描 --context:component-scan base-packagecn.itcast.ssm.service //beansspringmvc.xml ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlns:phttp://www.springframework.org/schema/pxmlns:contexthttp://www.springframework.org/schema/contextxmlns:mvchttp://www.springframework.org/schema/mvcxsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsdhttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd!-- 配置controller扫描包 --context:component-scan base-packagecn.itcast.ssm.controller /!-- 注解驱动 --mvc:annotation-driven /!-- Example: prefix/WEB-INF/jsp/, suffix.jsp, viewnametest - /WEB-INF/jsp/test.jsp --!-- 配置视图解析器 --beanclassorg.springframework.web.servlet.view.InternalResourceViewResolver!-- 配置逻辑视图的前缀 --property nameprefix value/WEB-INF/jsp/ /!-- 配置逻辑视图的后缀 --property namesuffix value.jsp //bean/beansweb.xml ?xml version1.0 encodingUTF-8? web-app xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexmlnshttp://java.sun.com/xml/ns/javaeexsi:schemaLocationhttp://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsdidWebApp_ID version2.5display-namespringmvc-web/display-namewelcome-file-listwelcome-fileindex.html/welcome-filewelcome-fileindex.htm/welcome-filewelcome-fileindex.jsp/welcome-filewelcome-filedefault.html/welcome-filewelcome-filedefault.htm/welcome-filewelcome-filedefault.jsp/welcome-file/welcome-file-list!-- 配置spring --context-paramparam-namecontextConfigLocation/param-nameparam-valueclasspath:spring/applicationContext*.xml/param-value/context-param!-- 使用监听器加载Spring配置文件 --listenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class/listener!-- 配置SrpingMVC的前端控制器 --servletservlet-namespringmvc-web/servlet-nameservlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-classinit-paramparam-namecontextConfigLocation/param-nameparam-valueclasspath:spring/springmvc.xml/param-value/init-param/servlet!-- 1. /* 拦截所有 jsp js png .css 真的全拦截 建议不使用2. *.action *.do 拦截以do action 结尾的请求 肯定能使用 ERP 3. / 拦截所有 不包括jsp) (包含.js .png.css) 强烈建议使用 前台 面向消费者 www.jd.com/search /对静态资源放行--servlet-mappingservlet-namespringmvc-web/servlet-name!-- 配置所有以action结尾的请求进入SpringMVC --url-pattern*.action/url-pattern/servlet-mapping/web-app加入jsp页面 itemList.jsp % page languagejava contentTypetext/html; charsetUTF-8pageEncodingUTF-8% % taglib urihttp://java.sun.com/jsp/jstl/core prefixc % % taglib urihttp://java.sun.com/jsp/jstl/fmt prefixfmt% !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html head meta http-equivContent-Type contenttext/html; charsetUTF-8 title查询商品列表/title /head body form action${pageContext.request.contextPath }/item/queryitem.action methodpost 查询条件 table width100% border1 tr tdinput typesubmit value查询//td /tr /table 商品列表 table width100% border1 trtd商品名称/tdtd商品价格/tdtd生产日期/tdtd商品描述/tdtd操作/td /tr c:forEach items${itemList } varitem trtd${item.name }/tdtd${item.price }/tdtdfmt:formatDate value${item.createtime} patternyyyy-MM-dd HH:mm:ss//tdtd${item.detail }/tdtda href${pageContext.request.contextPath }/itemEdit.action?id${item.id}修改/a/td/tr /c:forEach/table /form /body/html itemEdit.jsp % page languagejava contentTypetext/html; charsetUTF-8pageEncodingUTF-8% % taglib urihttp://java.sun.com/jsp/jstl/core prefixc % % taglib urihttp://java.sun.com/jsp/jstl/fmt prefixfmt% !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html head meta http-equivContent-Type contenttext/html; charsetUTF-8 title修改商品信息/title/head body !-- 上传图片是需要指定属性 enctypemultipart/form-data --!-- form iditemForm action methodpost enctypemultipart/form-data --form iditemForm action${pageContext.request.contextPath }/updateitem.action methodpostinput typehidden nameitems.id value${item.id } / 修改商品信息table width100% border1trtd商品名称/tdtdinput typetext nameitems.name value${item.name } //td/trtrtd商品价格/tdtdinput typetext nameitems.price value${item.price } //td/trtrtd商品生产日期/tdtdinput typetext nameitems.createtimevaluefmt:formatDate value${item.createtime} patternyyyy-MM-dd HH:mm:ss/ //td/tr%-- trtd商品图片/tdtdc:if test${item.pic !null}img src/pic/${item.pic} width100 height100/br//c:ifinput typefile namepictureFile/ /td/tr--%trtd商品简介/tdtdtextarea rows3 cols30 nameitems.detail${item.detail }/textarea/td/trtrtd colspan2 aligncenterinput typesubmit value提交 //td/tr/table/form /body/html
http://www.sadfv.cn/news/339065/

相关文章:

  • 网站空间域名郑州网站seo优
  • 深圳最好的网站建设大连优化排名推广
  • 织梦如何做中英文版的网站做网站需要编程?
  • 做包装看什么网站编程网站ide做的比较好的
  • 邢台邯郸做网站中山工商注册公司
  • php如何搭建网站后台wordpress 怎么看
  • 陕西公司网站建设郑州建设网站
  • 网站logo怎么做的开发者模式怎么关闭华为
  • 提供专业网站小程序开发营销型网站建设域名
  • 广 做网站蓝光电影下载公关公司多少钱一个月
  • 龙果学院大型网站稳定性建设全国被执行人名单查询
  • 南坪做网站360搜索怎么做网站自然优化
  • 有域名如何建设网站视觉设计网
  • h5做招聘网站wordpress报价
  • 谷歌企业网站seo武安建设局网站
  • 精神文明建设专题网站建立网站的几个步骤
  • 黄埔网站建设南京网站销售
  • 专业网站定制报价网站建设歺首选金手指12
  • 网站建设策划书ppt地方网站怎么做的
  • 企业网站推广内容wampserver做网站
  • 邵东微网站建设办公用品网站建设
  • 网站建设功能定位企业网站制作公司排名
  • 集团公司网站建设品牌微信手机官网登录入口注册
  • 网站后台html编辑器wordpress 页面找不到
  • 怎样给自己网站做反链wordpress 免费中文模板下载地址
  • 网站建设百度推广网站建设实训个人总结
  • 门户网站建设注意事项网站开发语言介绍
  • 宁波建设系统网站网络推广大概需要多少钱
  • 网站负责人 备案网页制作基础教程背景图片
  • 社交网站做强江苏昆山网站建设