SSM框架的XML等配置(简单、基础、入门)
发布日期:2022-02-28 11:05:49 浏览次数:3 分类:技术文章

本文共 2494 字,大约阅读时间需要 8 分钟。

本章记录一下Spring、SpringMVC、Mybatis整合的配置操作–小白篇

SSM框架主要在于搭建resources文件里的配置文件,配置好了写逻辑代码就很方便
配置jdbc.properties-----这里写连接数据库的配置

##驱动类mysql.driverClass=com.mysql.cj.jdbc.Driver##########jdbc:mysql://服务器地址:端口号/数据明?mysql8.0的操作mysql.url=jdbc:mysql://localhost:3306/ssmvip03?useSSL=true&serverTimezone=UTC###数据库用户名mysql.username=root###数据库密码mysql.password=root

配置myBatis-config.xml -----MyBatis的配置

配置applicationContext.xml-----Spring的xml配置整合Mybatis

配置SpringMVC.xml-----SpringMVC的配置

以上配置完成,就完成了SSM的配置

下面配置服务器
web.xml的配置

encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encodingFilter
UTF-8
encodingFilter
/*
dispatcherServlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:SpringMVC.xml
dispatcherServlet
/
contextConfigLocation
classpath:applicationContext.xml
org.springframework.web.context.ContextLoaderListener

转载地址:https://blog.csdn.net/weixin_47427198/article/details/108631426 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:spring与mybatis的整合(简单、基础)
下一篇:认识MyBatis、Mybatis笔记.MyBatis的核心配置,动态Mapper,动态SQL,表的关联及分页操作和缓存理解

发表评论

最新留言

关注你微信了!
[***.104.42.241]2024年03月26日 00时49分29秒