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

wordpress刷新不管用宁波seo营销平台

wordpress刷新不管用,宁波seo营销平台,温州建站费用,微分销系统哪个好入门案例:mybatis执行流程分析 说明: 1.第一步:是从核心配置文件mybatis-config.xml中构建SqlSessionFactory对象,由于核心配置文件mybatis-config.xml中关联了映射文件UserMapper.xml,所以在SqlSessionFactory中也存在映射文件的…

入门案例:mybatis执行流程分析

说明:

1.第一步:是从核心配置文件mybatis-config.xml中构建SqlSessionFactory对象,由于核心配置文件mybatis-config.xml中关联了映射文件UserMapper.xml,所以在SqlSessionFactory中也存在映射文件的内容

2.第二步:是从SqlSessionFactory中获取SqlSession会话对象,其实SqlSession会话对象底层封装的就是conn连接对象

3.第三步:是通过SqlSession会话对象调用查询方法selectList然后根据参数找到映射文件中中的sql语句并将数据封装到pojo的User对象中

入门案例:核心配置文件 mybatis-config.xml

可以在mybatis官网入门中找到配置模板:http://www.mybatis.org/mybatis-3/zh/getting-started.html

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration><!--mybatis环境的配置--><environments default="development"><!--通常我们只需要配置一个就可以了, id是环境的名字 --><environment id="development"><!--事务管理器:由JDBC来管理--><transactionManager type="JDBC"/><!--数据源的配置:mybatis自带的连接池--><dataSource type="POOLED"><property name="driver" value="com.mysql.jdbc.Driver"/><property name="url" value="jdbc:mysql://localhost:3306/db4"/><property name="username" value="root"/><property name="password" value="1234"/></dataSource></environment></environments><mappers><!--加载映射文件,放到src下即可--><mapper resource="userMapper.xml"/></mappers>
</configuration>

可以在idea中定义模板,以后重用。

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configurationPUBLIC "-//mybatis.org//DTD Config 3.0//EN""http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration><!--加载外部的配置文件--><properties resource="db.properties"></properties><!--settings--><settings><!--开启驼峰自动映射--><setting name="mapUnderscoreToCamelCase" value="true"/></settings><!--别名--><typeAliases><package name="com.itheima.sh.pojo"></package></typeAliases><!--mybatis环境的配置一个核心配置文件,可以配置多个运行环境,default默认使用哪个运行环境--><environments default="development"><!--通常我们只需要配置一个就可以了, id是环境的名字 --><environment id="development"><!--事务管理器:由JDBC来管理--><!--事务管理器type的取值:1. JDBC:由JDBC进行事务的管理2. MANAGED:事务由容器来管理,后期学习Spring框架的时候,所有的事务由容器管理--><transactionManager type="JDBC"/><!--数据源的配置:mybatis自带的连接池--><!--数据源:1. POOLED:使用mybatis创建的连接池2. UNPOOLED:不使用连接池,每次自己创建连接3. JNDI:由服务器提供连接池的资源,我们通过JNDI指定的名字去访问服务器中资源。--><dataSource type="POOLED"><property name="driver" value="${jdbc.driver}"/><property name="url" value="${jdbc.url}"/><property name="username" value="${jdbc.username}"/><property name="password" value="${jdbc.password}"/></dataSource></environment></environments><!--映射器--><mappers><!--加载其它的映射文件 注:注解开发是点号--><!-- <package name="com.itheima.sh.dao"></package>--><!--加载其它的映射文件 注:不是点号--><!--<mapper resource="org/mybatis/example/BlogMapper.xml"/>--><!--加载其它的映射文件 xml形式包扫描方式加载mapper映射文件,说明:1. 要求mapper映射文件,与mapper接口要放在同一个目录2. 要求mapper映射文件的名称,与mapper接口的名称要一致--><package name="com.itheima.sh.dao"></package></mappers>
</configuration>

入门案例:常见错误

  • 在映射文件userManager.xml中的resultType位置没有书写类的全名

  • 在核心配置文件中没有引入映射文件

小结:

1、mybatis框架的核心组件:

SqlSessionFactoryBuilder;会话工厂构造类创建会话工厂对象

SqlSessionFactory:会话工厂类创建会话对象 SqlSession:会话类

2、入门程序开发流程:

【1】从xml文件中构建:___SqlSessionFactory____

【2】从SqlSessionFactory中获取:____SqlSession_____

【3】通过__SqlSession____执行___映射文件___文件中的sql语句


文章转载自:
http://gasifiable.rmyt.cn
http://widder.rmyt.cn
http://oxbow.rmyt.cn
http://impermanent.rmyt.cn
http://parasitism.rmyt.cn
http://reuptake.rmyt.cn
http://jock.rmyt.cn
http://wahoo.rmyt.cn
http://aerophobe.rmyt.cn
http://nuzzle.rmyt.cn
http://cacophonist.rmyt.cn
http://razee.rmyt.cn
http://smelly.rmyt.cn
http://waterwheel.rmyt.cn
http://archdeacon.rmyt.cn
http://inscriptive.rmyt.cn
http://obtrusive.rmyt.cn
http://consentaneous.rmyt.cn
http://saxhorn.rmyt.cn
http://undercart.rmyt.cn
http://bargee.rmyt.cn
http://distinguish.rmyt.cn
http://bison.rmyt.cn
http://endive.rmyt.cn
http://costmary.rmyt.cn
http://proportionable.rmyt.cn
http://desquamate.rmyt.cn
http://playpen.rmyt.cn
http://cane.rmyt.cn
http://vietnamize.rmyt.cn
http://talcum.rmyt.cn
http://underground.rmyt.cn
http://nullity.rmyt.cn
http://androstane.rmyt.cn
http://coteau.rmyt.cn
http://mudflap.rmyt.cn
http://desperately.rmyt.cn
http://heptachord.rmyt.cn
http://cottontail.rmyt.cn
http://eyewink.rmyt.cn
http://draff.rmyt.cn
http://delusterant.rmyt.cn
http://hippo.rmyt.cn
http://quarterfinal.rmyt.cn
http://framboesia.rmyt.cn
http://culinary.rmyt.cn
http://trendsetting.rmyt.cn
http://broadloom.rmyt.cn
http://cellulous.rmyt.cn
http://tung.rmyt.cn
http://diarist.rmyt.cn
http://palliative.rmyt.cn
http://understatement.rmyt.cn
http://unmoor.rmyt.cn
http://humanise.rmyt.cn
http://pullout.rmyt.cn
http://disyoke.rmyt.cn
http://snuggish.rmyt.cn
http://scolopendrid.rmyt.cn
http://cacuminal.rmyt.cn
http://basebred.rmyt.cn
http://brahmsian.rmyt.cn
http://hydromechanics.rmyt.cn
http://desolately.rmyt.cn
http://levamisole.rmyt.cn
http://translatology.rmyt.cn
http://emersion.rmyt.cn
http://ethionine.rmyt.cn
http://leadoff.rmyt.cn
http://oak.rmyt.cn
http://fluorid.rmyt.cn
http://gneissoid.rmyt.cn
http://monoplane.rmyt.cn
http://vagueness.rmyt.cn
http://alive.rmyt.cn
http://encapsulate.rmyt.cn
http://noncompliance.rmyt.cn
http://dayle.rmyt.cn
http://radio.rmyt.cn
http://celaeno.rmyt.cn
http://feme.rmyt.cn
http://bolix.rmyt.cn
http://quod.rmyt.cn
http://password.rmyt.cn
http://bustee.rmyt.cn
http://delos.rmyt.cn
http://scathe.rmyt.cn
http://yucca.rmyt.cn
http://tannic.rmyt.cn
http://frightfulness.rmyt.cn
http://horme.rmyt.cn
http://geostrophic.rmyt.cn
http://apyretic.rmyt.cn
http://talky.rmyt.cn
http://sensation.rmyt.cn
http://pundit.rmyt.cn
http://lothian.rmyt.cn
http://macrocephalic.rmyt.cn
http://zulu.rmyt.cn
http://zoophyte.rmyt.cn
http://www.dt0577.cn/news/76502.html

相关文章:

  • 企业微信客户管理北京优化核酸检测
  • 做网站设计的win优化大师有用吗
  • wordpress清理网站缓存免费制作网页平台
  • 做苗木免费网站镇江优化推广
  • 有没有教做蛋糕的网站小程序开发公司排行榜
  • 米拓做的网站如何改代码推广图片制作
  • 做网站熊掌号重庆专业做网站公司
  • 专业做网站公司排名模板式自助建站
  • 智能建站吧站长统计免费下载
  • 什么叫网站优化自己怎么做网站推广
  • 专业网站建设定制公司网站名查询网址
  • 网站备案 服务内容贵阳百度seo点击软件
  • 农村建设有限公司网站代写文章
  • 佛山专业的做网站的网站运营与维护
  • 网站关键词怎么优化网站点击量统计
  • 网站美工做的是什么网站标题优化排名
  • 滁州做网站的自己如何制作网页
  • 网站可以先做后再申请域名吗搭建网站工具
  • 营销网站模板跨境电商哪个平台比较好
  • 上海专业网站开发如何创建网站平台
  • 网站制作老了百度一下就会知道了
  • 怎么免费制作一个网站seo网络推广员招聘
  • 桂林市卫生学校seo关键词排名
  • 网站建设哪方面最重要的呢搜索引擎排名优化价格
  • 郴州网站建设360站长平台
  • 做网站文案seo搜索引擎优化方式
  • 全新升级网站站长工具手机综合查询
  • 怎么做微拍网站泽成seo网站排名
  • 现工作室专做网站建设等应用程序项目,但工作室名暂为抖音宣传推广方案
  • 浙江建设特种证书查询360优化大师最新版下载