ssm,集合,io,线程,ajax,设计模式,,注册登录,注入ben,sql,冒泡。linux命令;
设计模式:
https://www.jianshu.com/p/1c3a7ab5c527
public private protected default

==
比的是2个基本数据的值,也可以比对象的内存地址
equals 比较的是2个字符的内容
4类8种数据类类型
1、整型
byte(1) 、short(2) 、int(4) 、long(8)
2、浮点型
float(4) 、 double(8)
3、字符型
char(2)
4、布尔型
boolean(英 /'bu:liən/)(1)
jsp的九大内置对象:https://www.cnblogs.com/1314Justin/p/11118534.html
Request,response,session,out,page,application,exception(英 /ɪkˈsepʃn/),pageContext,config
java的特性:封装,继承,多态
继承
extends /ɪk'stendz; ek-/关键字 继承
implements /'ɪmplɪm(ə)nts/关键字 实现
abstract /ˈæbstrækt/关键字 抽象类
interface 关键字 接口
1,封装:是指一种将抽象性函式接口的实现细节部份包装、隐藏起来的方法。
封装可以被认为是一个保护屏障,防止该类的代码和数据被外部类定义的代码随机访问。,
2,继承是java面向对象编程技术的一块基石,因为它允许创建分等级层次的类。
继承就是子类继承父类的特征和行为,使得子类对象(实例)具有父类的实例域和方法,或子类从父类继承方法,使得子类具有父类相同的行为、
3,多态:多态是同一个行为具有多个不同表现形式或形态的能力。
多态就是同一个接口,使用不同的实例而执行不同操作,如图所示
重写(Override)与重载(Overload):https://www.runoob.com/java/java-override-overload.html
1,方法重载是一个类中定义了多个方法名相同,而他们的参数的数量不同或数量相同而类型和次序不同,则称为方法的重载(Overloading)。
2,方法重写是在子类存在方法与父类的方法的名字相同,而且参数的个数与类型一样,返回值也一样的方法,就称为重写(Overriding)。
3,方法重载是一个类的多态性表现,而方法重写是子类与父类的一种多态性表现
ssm的常用注解:https://blog.csdn.net/clks_/article/details/81865122
@Controller 控制层
@Sevice 业务逻辑层
@Repository 持久层
@Autowired 采用类型的方式自动装配
@Resource 采用名称加注解的方式完成自动装配
@ResponseBody
@RequestBody
@RequestMapping 该注解描述请求路径和当前方法的映射
@ModelAttribute:https://blog.csdn.net/J080624/article/details/52817823
@PathVariable("password") String password)
@SessionAttributes
@requestParam
@Component:中立的类
spring mvc 执行流程:

集合:https://blog.csdn.net/zhangqunshuai/article/details/80660974

启动线程2种方式:https://blog.csdn.net/qq_31806155/article/details/78808550
第一种继承 Thread /θred/() 重写类的 run 方法
第二种方法是实现Runnable接口
实现Callable /'kɔːləb(ə)l/ 实现这个方法call()
synchronized /'sɪŋkrənaɪzd/
finll
7、重定向和转发的区别
响应次数、地址栏改变与否、是否带参数【两者都是用来跳转页面的方法】
重定向:redirect /[ˌri:dəˈrekt]/——告诉浏览器请求另一个地址,地址栏url改变
转 发:forward /ˈfɔːwəd/ ——请求不中断,转发到另一个资源,请求另一个地址后再把返回内容返回到客户端,地址栏url不改变
升序及降序排列。
insert INTO student(id,name) VALUES(3,'wangwu');
Delete FROM student WHERE id=7;
update student SET name=‘caocao’,grade=50 WHERE id=1;
SELECT * from runoob_tbl ORDER /ˈɔːdə(r)/ BY submission_date ;
SELECT * from runoob_tbl ORDER BY submission_date DESC;
操作表:Drop ,create,updata,Desc(查看表结构)
group by{分组;Count(*)是单个分组里面的数据;group by q,w 意思是把有q,w的字段归为一组}
having{结合分组用的,where是整表所有的数据,having是单个分组里面的数据 }
order by Asc 小到大,升序;desc反之;
limit
聚合函数
COUNT,AVG,SUM,,,,,
拦截器,过滤器
他们的简单实例:https://blog.csdn.net/chenxihua1/article/details/80779234
区别:https://www.baidu.com/link?url=NdoVWE2jt5yFp3dHLir2QrvYg8NjozElAe6V8SmW74uT9JxH8yee-oP8N6hIPbt0xkYlZ2Y49dVSrsh_X41BJa&wd=&eqid=8fd49ea10003c45f000000065da84cff
Filter过滤器:拦截web访问url地址。
Interceptor 英 /ˌɪntəˈseptə(r)/拦截器:拦截以 .action结尾的url,拦截Action的访问。
1、拦截器是基于Java的反射机制,过滤器是基于java的函数回调
2、拦截器不依赖于servlet容器,而过滤器依赖于servlet容器
3、拦截器只能对action请求起作用,过滤器几乎对所有的请求起作用
4、拦截器可以访问action上下文,值栈里的对象,而过滤器不能访问
5、在action生命周期中,拦截器可以被多次调用,过滤器只能在servlet溶初始化是调用一次
6、拦截器可以获取IOC容器中的各个bean,过滤器不行,在拦截器中注入一个service可以调用逻辑业务
4种索引:单列索引,组合索引,全文索引,空间索引。:https://www.jianshu.com/p/0d6c828d3c70
("#keyword").val(),
dataType:"json", 预期服务器返回数据的类型
success ( /səkˈses/):function(data){
if(data.success){
("#searchResult").html("出现错误:" + data.msg);
}
},
error:function(jqXHR){
aler("发生错误:"+ jqXHR.status);
}
});
mybatis面试题:https://blog.csdn.net/a745233700/article/details/80977133
mybitis标签:https://blog.csdn.net/weixin_40950778/article/details/78655288
怎么优化mybatis:https://blog.csdn.net/qq_35642036/article/details/82820129
数据库事务(Transanction)正确执行的四个基本要素:
1、原子性(Atomicity):事务开始后所有操作,要么全部完成,要么全部不完成,不可能停滞在中间环节。事务执行过程中出错,会回滚(Rollback)到事务开始前的状态,所有的操作就像没有发生一样。也就是说事务是一个不可分割的整体,就像化学中学过的原子,是物质构成的基本单位
2、一致性(Consistency):事务开始前和结束后,数据库的完整性约束没有被破坏 。比如A向B转账,不可能A扣了钱,B却没收到
3、隔离性(Isolation):同一时间,只允许一个事务请求同一数据,不同的事务之间彼此没有任何干扰。比如A正在从一张银行卡中取钱,在A取钱的过程结束前,B不能向这张卡转账
4、持久性(Durability):事务完成后,该事务所对数据库所作的更改将被保存到数据库之中,不能回滚
构造方法属性注入(<constructor-arg/>)

set方法注入(<property> 如果一个类里面还有一个类对象属性就用ref引入另外一个类的id或者name)

命名空间注入(p名称空间注入)


aop:https://blog.csdn.net/qq_32317661/article/details/82878679


(新):2种创建方式:https://blog.csdn.net/qq_34273340/article/details/79310335
mybatis
传递多参数
第一接口形参定义多个值,不加@param 传递的后再xml文件里面定义 arg0,arg1,param1,param2。
接口里面加param则会把这些参数包装成map ,param里面的值则变成key,xml文件里面填param里面的值
javaben传递,传递一个对象,xml文件里面写属性名
map对象传输,map里面写入key和基本值,不要写对象进去,然后xml文件里面放key里面的值

mybatis 里面的if(and的关系),foreach(or的关系),choose 英 /tʃuːz/。
<select id="dynamicForeach2Test" parameterType="java.util.ArrayList" resultType="Blog">
select * from t_blog where id in
<foreach collection="array" index="index" item="item" open="(" separator="," close=")">
{item}
</foreach>
</select>
<choose>
<when test=" type == 'x1' '">
where 条件1;
</when >
<when test=" type == 'x2' '">
where 条件2;
</when >
<otherwise>
条件3; // 可以为空
</otherwise>
</choose>
<select id="selectBusinessByHoutaiShenhe" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from tb_business
<where>
<if test="starts != null and starts != '' ">
and starts = #{starts,jdbcType=INTEGER}
</if>
<if test="startTime !=null and startTime != '' ">
and register_time <![CDATA[>= ]]>#{startTime,jdbcType=TIMESTAMP}
</if>
<if test="endTime != null and endTime != '' ">
and register_time <![CDATA[<= ]]> #{endTime,jdbcType=TIMESTAMP}
</if>
</where>
</select>
集合的几种迭代,遍历:https://www.cnblogs.com/leskang/p/6031282.html
Iterator 英 /ɪtə'reɪtə/ it = list.iterator();
while(it.hasNext()) {
Object obj = it.next();
}
Map遍历
Iterator<Map.Entry<Integer, String>> it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Integer, String> entry = it.next();
System.out.println("key= " + entry.getKey() + " and value= " + entry.getValue());
}
包装类的介绍:https://blog.csdn.net/ifenggege/article/details/80499199
Integer 、Long、Short、Byte、Character 英 /ˈkærəktə(r)/、Double、Float、Boolean
String s=new String(“abc”)创建了几个对象
答:2个,在字符池创建abc对象 和)在内存(堆)创建string对象存储 "Hello "
jQuery 的attr()与css()的区别
attr():修改标签 的属性和值
css():修改css样式的样式和值
<form action(/ˈækʃn/)=" " method(/ˈmeθəd/)=" ">
@RequestMapping(value="/addUser5",method=RequestMethod.POST):不写默认get post支持
大到小排序
for (int i = 0; i < arr.length - 1; i++) {
for (int j = i + 1; j < arr.length; j++) {
if (arr[i] < arr[j]) {
//让左边最大
int temp = arr[j];
arr[j] = arr[i];
arr[i] = temp;
}
}
}
JSTL和EL表达式:https://www.jianshu.com/p/5bf09ec09d4c
eval():js里面的函数,把字符串转化为js代码来执行

网友评论