摘要: 一.导入jar包 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> </dependency> <dependency> <groupId>org.mybatis< 阅读全文
posted @ 2019-11-23 15:19 Kaneha 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 代码如下 <servlet> <servlet-name>springMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <p 阅读全文
posted @ 2019-11-04 15:07 Kaneha 阅读(331) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/a509edc4fc08 阅读全文
posted @ 2019-05-13 20:18 Kaneha 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 什么是索引? 描述 : 为表设置索引,会按照设置的索引生成索引文件,查询时通过索引文件来查询,从而提高查询速度 作用 : 可以大大提高查询速度 副作用 : 会降低更新表(insert,update,delete)的速度,因为更新表时,mysql不仅要保存数据,还要保存索引文件 索引分类 : 单列索引 阅读全文
posted @ 2019-05-12 16:05 Kaneha 阅读(178) 评论(0) 推荐(0) 编辑
摘要: count() 空不会被计入,但null值会被计入 红框为空,蓝框为null值 阅读全文
posted @ 2019-05-12 09:39 Kaneha 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 自定义properties文件获取属性 使用 @ConfigurationProperties((prefix = "demo")) 和 @PropertySource("classpath:myconfig.properties") 来批量注值到bean中 不要忘了@Component appli 阅读全文
posted @ 2019-05-10 19:42 Kaneha 阅读(5872) 评论(0) 推荐(0) 编辑
摘要: SpringMVC 1.手动放入ModelAndView/Model中,返回页面 或者 2.使用@ModelAttribute 阅读全文
posted @ 2019-05-10 17:10 Kaneha 阅读(155) 评论(0) 推荐(0) 编辑
摘要: SpringBoot+ThymeLeaf+JPA 前台 表单的enctype="multipart/form-data" 不要忘记设置 后台 SpringMVC使用MultipartFile来接收前台传入的文件 f 阅读全文
posted @ 2019-05-10 16:38 Kaneha 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 以tomcat为例 项目结构 开发时的项目结构 蓝框 : 存放java文件 绿框 : 存放配置文件 红框 : 存放前台代码 这个项目结构大家都很熟悉,那么当项目被部署到tomcat中时,项目的结构会发生什么变化? tomcat中部署的项目结构 首先是项目部署路径: eclipse : ......\ 阅读全文
posted @ 2019-05-10 15:58 Kaneha 阅读(479) 评论(0) 推荐(0) 编辑
摘要: function showPhoto(tag){ var file = tag.files[0]; var fr = new FileReader(); //把图片内容读取到DataURL中 fr.readAsDataURL(file); fr.onload = function(){ //获取读取的内容 ... 阅读全文
posted @ 2019-05-09 17:10 Kaneha 阅读(309) 评论(0) 推荐(0) 编辑