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

springmvc mysql配置_springMVC3.2+spring3.2.4+hibernate 4.2.4+MySQL环境配置

ps:通过三个xml文件配置,不同的版本头文件不同,建议从源文件考取。请注意文中所有路径

一、applicationContext.xml  Spring的配置

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:context="http://www.springframework.org/schema/context"

xsi:schemaLocation="

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx-3.2.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-3.2.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.2.xsd

"

>

class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">

org.hibernate.dialect.MySQLDialect

true

com/ksdhc/bo/user.hbm.xml

二、springmvc_servlet.xml    springMVC的配置

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"

xmlns:mvc="http://www.springframework.org/schema/mvc"

xsi:schemaLocation="

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-3.2.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.2.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd

">

class="org.springframework.web.servlet.view.InternalResourceViewResolver">

三、web.xml

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">

JumperWork

index.jsp

contextConfigLocation

classpath*:/applicationContext.xml

org.springframework.web.context.ContextLoaderListener

JumperWork

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

classpath*:/springmvc-servlet.xml

1

JumperWork

/

encodingFilter

org.springframework.web.filter.CharacterEncodingFilter

encoding

UTF-8

forceEncoding

true

encodingFilter

/*

四、user.hbm.xml  Hibernate属性配置

hibernate-mapping PUBLIC

"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

相关文章:

  • win10 mysql5.7.20_Win10下MySQL5.7.20 Mysql(64位)解壓版安裝及bug修復
  • java 列出目录文件_java简单列出文件夹下所有文件的方法
  • java 代码下载excel_上传下载Excel的Demo,java代码
  • java数据类型最大值_Java 基本数据类型最大值极限和最小值极限
  • java json formatter_DataTimeFormatter 注解和 JsonFormatter注解的区别及应用
  • java 排名算法_JAVA算法之高级排序
  • java protobuf 反射_尝试在java中使用protobuf发送和接收消息,但收到错误:协议消息包含无效标记(零)...
  • java word 批注_Java 添加、回复、修改(替换)、删除Word批注
  • java自动化开发_五大Java自动化测试框架
  • java接口原理_java接口回调的原理
  • python复制excel到另一个excel_Python自动化办公Excel-从表中批量复制粘贴数据到新表...
  • python文件对象是可以迭代的_请教使用Python迭代文件
  • decorator模式 java_Java设计模式之装饰者模式(Decorator pattern)
  • java 文件写入本地文件_Java IO从本地读取文件写入本地另个文件
  • python重定向怎么理解_python重定向原理及实例
  • 10个确保微服务与容器安全的最佳实践
  • IIS 10 PHP CGI 设置 PHP_INI_SCAN_DIR
  • java第三方包学习之lombok
  • JAVA多线程机制解析-volatilesynchronized
  • JS函数式编程 数组部分风格 ES6版
  • Linux gpio口使用方法
  • vue:响应原理
  • Vue源码解析(二)Vue的双向绑定讲解及实现
  • 编写符合Python风格的对象
  • 大快搜索数据爬虫技术实例安装教学篇
  • 如何使用Mybatis第三方插件--PageHelper实现分页操作
  • 分布式关系型数据库服务 DRDS 支持显示的 Prepare 及逻辑库锁功能等多项能力 ...
  • 教程:使用iPhone相机和openCV来完成3D重建(第一部分) ...
  • #if和#ifdef区别
  • (C++17) std算法之执行策略 execution
  • (delphi11最新学习资料) Object Pascal 学习笔记---第8章第5节(封闭类和Final方法)
  • (pytorch进阶之路)扩散概率模型
  • (附源码)ssm高校升本考试管理系统 毕业设计 201631
  • (切换多语言)vantUI+vue-i18n进行国际化配置及新增没有的语言包
  • (三)Pytorch快速搭建卷积神经网络模型实现手写数字识别(代码+详细注解)
  • (转)总结使用Unity 3D优化游戏运行性能的经验
  • @Data注解的作用
  • [AIGC] 开源流程引擎哪个好,如何选型?
  • [ai笔记9] openAI Sora技术文档引用文献汇总
  • [Android] Upload package to device fails #2720
  • [APIO2012] 派遣 dispatching
  • [C#]winform部署yolov9的onnx模型
  • [C++]高精度 bign (重载运算符版本)
  • [CDOJ 1343] 卿学姐失恋了
  • [CSS]CSS 的背景
  • [flink总结]什么是flink背压 ,有什么危害? 如何解决flink背压?flink如何保证端到端一致性?
  • [Flutter]打包IPA
  • [html] 动态炫彩渐变背景
  • [jobdu]不用加减乘除做加法
  • [LeetCode]Reverse Linked List II
  • [linux] GFLOPS和TFLOPS的换算
  • [NHibernate]一对多关系(关联查询)
  • [office] 图文演示excel怎样给单元格添加下拉列表 #知识分享#经验分享
  • [POJ1236]Network of Schools(并查集+floyd,伪强连通分量)
  • [SageMath] 关于SageMath本地环境的搭建与基本使用