摘要: #context:annotation-config与context:component-scan的作用 ##一、context:annotation-config/ ###1.如果不配置context:annotation-config/的话,我们使用@Resource、@PostConstruc 阅读全文
posted @ 2021-12-23 11:03 AboutChristopher 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #Spring学习笔记02 ##一、使用JAVA代码的方式配置Spring ###1.pojo包的同目录下创建一个名为config的包,config包中存放配置类java代码 package com.hx.config; import com.hx.pojo.User; import org.spr 阅读全文
posted @ 2021-12-17 14:45 AboutChristopher 阅读(31) 评论(0) 推荐(0) 编辑
摘要: #Spring学习笔记01 ##一、Spring ###Spring是一个开源的免费框架;Spring是一个轻量级的非入侵式的框架;控制反转ioc,面向切片编程AOP;支持事务的处理对框架整合的支持。 ##二、IOC创建对象的方式 ###1.默认方式是使用无参构造方法创建对象 ###2.当实体类中有 阅读全文
posted @ 2021-12-13 17:38 AboutChristopher 阅读(19) 评论(0) 推荐(0) 编辑
摘要: #Mybatis学习笔记04 ##一、复杂查询语句 ###1.多对一查询 ###案例:每个学生都对应一个老师(实体类的属性中有一个是对象) 我们需要查询所有学生的信息以及对应的老师的信息 方式1:按照我们编写的SQL语句输出来的结果嵌套处理 <select id="getStudent2" resu 阅读全文
posted @ 2021-12-10 17:16 AboutChristopher 阅读(27) 评论(0) 推荐(0) 编辑
摘要: #Mybatis学习笔记03 ##一、日志工厂 ##使用日志有利于我们排查错误 ###1.STDOUT_LOGGING <settings> <setting name="logImpl" value="STDOUT_LOGGING"/> </settings> 注意不要放错位置! <!--注意大小 阅读全文
posted @ 2021-12-09 17:14 AboutChristopher 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #Mybatis学习笔记02 ##一、Mybatis核心配置文件mybatis-config.xml配置解析 ###1.属性优化 ###2.别名优化 优化类型别名可以有效的降低全限定类名书写的冗余问题 方式一: 方式二:扫描实体类的包,其默认别名就是这个实体类的名字,注意首字母要小写 第二种方式适合 阅读全文
posted @ 2021-12-08 16:51 AboutChristopher 阅读(20) 评论(0) 推荐(0) 编辑
摘要: #Mybatis学习笔记01 ##一、什么是Mybatis MyBatis是一个支持普通SQL查询,存储过程和高级映射的优秀持久层框架。MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及对结果集的检索封装。MyBatis可以使用简单的XML或注解用于配置和原始映射,将接口和Java的PO 阅读全文
posted @ 2021-12-07 17:02 AboutChristopher 阅读(52) 评论(1) 推荐(0) 编辑
摘要: ###Server中的url和Depolyment中的Application context都改为该项目名 阅读全文
posted @ 2021-10-24 18:07 AboutChristopher 阅读(29) 评论(0) 推荐(0) 编辑
摘要: | 这次作业属于哪个课程 | https://edu.cnblogs.com/campus/zswxy/software0102/ | | | | | 这个作业要求在哪里 | https://edu.cnblogs.com/campus/zswxy/software0102/homework/111 阅读全文
posted @ 2020-09-13 12:24 AboutChristopher 阅读(139) 评论(0) 推荐(0) 编辑
摘要: |这次作业属于哪个课程 | https://edu.cnblogs.com/campus/zswxy/software0102/ | | | | | 这个作业要求在哪里 | https://edu.cnblogs.com/campus/zswxy/software0102/homework/1116 阅读全文
posted @ 2020-09-08 09:10 AboutChristopher 阅读(118) 评论(0) 推荐(0) 编辑