Fork me on GitHub
摘要: 新建spring-dao.xml文件 <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/ 阅读全文
posted @ 2024-03-25 21:09 一名狗书匠& 阅读(9) 评论(0) 推荐(0)
摘要: //第一步,在web.xml文件中注册<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSche 阅读全文
posted @ 2024-03-25 21:07 一名狗书匠& 阅读(22) 评论(0) 推荐(0)
摘要: beans.xml 配置文件 <!--不建议使用--> <!-- <bean id="user" class="com.jiang.pojo.user">--><!-- <constructor-arg index="0" value="岳不群"/>--><!-- </bean>--> <!-- < 阅读全文
posted @ 2024-03-16 22:41 一名狗书匠& 阅读(6) 评论(0) 推荐(0)
摘要: 缓存:mybatis中默认开启一级缓存sqlSession.clearCache(); 清除缓存<cache/> 开启二级缓存<cache type="org.apache.ibatis.cache.impl.PerpetualCache" size="1024" eviction="LRU" fl 阅读全文
posted @ 2024-03-16 22:40 一名狗书匠& 阅读(11) 评论(0) 推荐(0)
摘要: 动态sqlif 做判断拼接sql语句choose,when 类似于Java的switch判断set 修改语句专用,可以自动排错,比如多写了逗号sql,include 用于提取重复的语句,提高复用foreach 用于动态的查询多条信息 <!--if--> <select id="getBlogBy"> 阅读全文
posted @ 2024-03-16 22:40 一名狗书匠& 阅读(10) 评论(0) 推荐(0)
摘要: 连表查询多对一查询 <select id="findAll2" resultMap="a1"> SELECT s.`id` sid ,s.`name` sname ,t.`name` tname FROM `student` s ,`teacher` t WHERE s.`tid`=t.`id`</ 阅读全文
posted @ 2024-03-16 22:39 一名狗书匠& 阅读(8) 评论(0) 推荐(0)
摘要: //新建一个mybatis-config.xml文件<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "https://mybatis. 阅读全文
posted @ 2024-03-07 20:55 一名狗书匠& 阅读(6) 评论(0) 推荐(0)
摘要: web.xml 配置文件 最新依赖 <?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchem 阅读全文
posted @ 2024-03-07 20:54 一名狗书匠& 阅读(73) 评论(0) 推荐(0)
摘要: setHeader(String name, String value) 设置响应头信息,用于向浏览器表达我要做什么,比如是要返回html文 件,还是下载文件。。。。。 resp.setStatus(int sc) 设置响应状态码,HTTP/1.1 200 OK resp.setHeader("co 阅读全文
posted @ 2024-03-07 20:54 一名狗书匠& 阅读(25) 评论(0) 推荐(0)
摘要: <!-- --> 注释 <title> </title> 网页的开头,名字<body>主要内容,网页内容在这现实</body> <h1> 一级标签<h2> 二级标签<p> 段落标签<hr> 水平线标签 <br> 换行标签<strong> 粗体文字<em> 斜体文字&nbsp; 空格 <img> 图片 阅读全文
posted @ 2024-02-01 22:01 一名狗书匠& 阅读(12) 评论(0) 推荐(0)

asd