9月24号面试总结(康拓普1面)

康拓普面试
1.springmvc常用注解
@Controller @Requestmapping @RequestParam @Path_variables @ResponseBody

2.常用数据库优化:varchar可以建索引吗
MySQL的btree索引和hash索引的区别
varchar类型数据可以建索引

3.常用数据库表

4.hashmap遍历的方式
1.通过map.keySet()遍历key和value

 

2.Map.entrySet使用iterator遍历key和value

 

3.通过Map.entrySet遍历

4.通过Map.values遍历所有的values,但不能遍历key

5.springboot常用注解
@SpringbootApplication @Configuration @Bean @PropertySource(读取proprtties中的内容) @Value(获取properties中的内容) @ComponentScan(包扫描) @SpringBootTest

6.sql语句优化


7.查看sql的执行效率
mysql使用explain查看sql执行效率

8.mybatis #和$的区别
1、

#是预编译的方式,

$是直接拼接;

2、

#不需要关注数据类型,mybatis实现自动数据类型转换;

$不做数据类型转换,需要自行判断数据类型;

3、

#可以防止sql注入;

$不能防止sql注入;

4、

如果只有一个参数,默认情况下,

#{}中可以写任意的名字;

${}中只能用value来接收。

posted @ 2019-09-24 23:11  WhisperHong  阅读(531)  评论(0编辑  收藏  举报