摘要: 注解版 //指定这是一个操作数据库的mapper @Mapper public interface DepartmentMapper { @Select("select * from department where id=#{id}") public Department getDeptById( 阅读全文
posted @ 2020-10-15 14:26 xsyz 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 版本问题 使用nvm管理node的版本,从14降到10.11.0,gulp 用3.9.1. 阅读全文
posted @ 2020-10-13 00:13 xsyz 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 记第一次ssm整合出现的问题: 1.target目录的问题 如果出现找不到配置文件或者无法加载配置文件中的bean,可以查看一下target目录里是否有相关的xml文件,如果无法自动生成,则在pom文件里加上如下配置: <build> <resources> <resource> <director 阅读全文
posted @ 2020-10-07 20:56 xsyz 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 今天遇到表单提交问题,通过jsp的action提交给controller处理,但是总是404错误,检查了视图解析器没有错误,地址栏直接传参也会成功,后来观察了一下地址栏,发现表单提交完之后,路径上没有项目名,试了试在action中加入项目名,成功了。 工程名如下: jsp的action原本是这么写的 阅读全文
posted @ 2020-10-06 16:16 xsyz 阅读(563) 评论(0) 推荐(0) 编辑
摘要: Bean给属性赋值的几种方法: 1.property <property name="name" value="zs"></property> <property name="age" value="12"></property> <property name="age" ref="teacher" 阅读全文
posted @ 2020-10-03 11:34 xsyz 阅读(227) 评论(0) 推荐(0) 编辑
摘要: git的常用命令 1.创建版本库 初始化仓库,把这个目录变成Git可以管理的仓库 $ git init 把文件添加到缓存区,可以一次添加多个文件 $ git add 1.txt 2.txt 把文件提交到仓库 $ git commit -m "wrote fileS" 2.版本控制 查看状态: $ g 阅读全文
posted @ 2020-10-01 20:50 xsyz 阅读(157) 评论(0) 推荐(0) 编辑
摘要: mybatis应注意的问题 1.如果dao包里同时有接口和xml文件,在maven中打成war包的时候会报错. 解决办法: 在pom.xml文件中</dependencies>后添加以下代码: <build> <resources> <resource> <directory>src/main/re 阅读全文
posted @ 2020-09-26 23:50 xsyz 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 一对多和多对一 Student package com.southwind.entity; import lombok.Data; @Data public class Student { private long id; private String name; private Classes c 阅读全文
posted @ 2020-09-26 21:51 xsyz 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 当传递的是实体类中比较少的属性,而且实体类中属性比较多的时候,我们可以选择用map来代替实体类,如果传递的是几个不同的参数,也可以用map。 下面是传递多个参数,可以用map。 void updateInfo1(Map<String,Object> map); <update id="updateI 阅读全文
posted @ 2020-09-26 14:08 xsyz 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 在pom.xml中添加如下代码,可以解决java包下存在xml文件不能导出的问题 <build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties< 阅读全文
posted @ 2020-09-26 00:16 xsyz 阅读(593) 评论(0) 推荐(0) 编辑