摘要: 1.引入依赖 <!-- MyBatis分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2 阅读全文
posted @ 2020-06-10 00:31 努力学习的Peanut 阅读(237) 评论(1) 推荐(0)
摘要: 1.搭建环境 第一步: 创建一个普通的maven项目 第二步: 导入相关依赖 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13</version> </d 阅读全文
posted @ 2020-05-19 22:19 努力学习的Peanut 阅读(150) 评论(0) 推荐(0)
摘要: 一个简单的HelloSpringMVC程序 先在web,xml中注册一个前端控制器(DispatcherServlet) 1 <?xml version="1.0" encoding="UTF-8"?> 2 <web-app xmlns="http://xmlns.jcp.org/xml/ns/ja 阅读全文
posted @ 2020-05-19 00:33 努力学习的Peanut 阅读(314) 评论(0) 推荐(0)
摘要: 关于SpringMVC运行Tomcat控制台出现乱码的情况(在网上找到一种方法亲测有效) 找到tomcat文件夹中的conf包下的logging.properties中找到 java.util.logging.ConsoleHandler.encoding = UTF-8 将这行代码注销改为 jav 阅读全文
posted @ 2020-05-19 00:06 努力学习的Peanut 阅读(189) 评论(0) 推荐(0)
摘要: mapper: public interface BlogMapper { List<Blog> getBlogByIF(Map map); } IF <select id="getBlogByIF" resultType="blog" parameterType="map"> select * f 阅读全文
posted @ 2020-05-14 16:22 努力学习的Peanut 阅读(186) 评论(0) 推荐(0)
摘要: 步骤: 1.创建maven项目 2.编写工具类 3.编写实体类 4.编写mapper接口 5.配置xml 6.测试 多对一:多个学生关联一个老师 工具类: //sqlSessionFactory -->sqlSession public class MybatisUtils { private st 阅读全文
posted @ 2020-05-13 12:40 努力学习的Peanut 阅读(175) 评论(0) 推荐(0)
摘要: 其效果是点击图片切换到下一张图片 首先准备五张图片 1 <ul class="imge"> 2 <li><img src="images/1.jpg" width="400px" height="300px" /></li> 3 <li><img src="images/2.jpg" width=" 阅读全文
posted @ 2020-05-12 11:04 努力学习的Peanut 阅读(667) 评论(0) 推荐(0)
摘要: 1 <div class="buttons"> 2 <button id="katong">卡通</button>&nbsp;&nbsp;&nbsp; 3 <button id="jian">简约</button>&nbsp;&nbsp;&nbsp; 4 <button id="gufeng">古风 阅读全文
posted @ 2020-05-12 10:39 努力学习的Peanut 阅读(280) 评论(0) 推荐(0)