11 2021 档案

摘要:常用的Linux命令 平时一定要多使用这些基础的命令! 1)、cd : 改变目录。 2)、cd . . 回退到上一个目录,直接cd进入默认目录 3)、pwd : 显示当前所在的目录路径。 4)、ls(ll): 都是列出当前目录中的所有文件,只不过ll(两个ll)列出的内容更为详细。 5)、touch 阅读全文
posted @ 2021-11-30 08:49 江南0o0 阅读(31) 评论(0) 推荐(0)
摘要:初始化:git init 签名 项目级别/仓库级别:git config 名字:git config user.name tom_pro email:git config user.email good_pro 系统级:git config -global 名字:git config user.na 阅读全文
posted @ 2021-11-29 16:06 江南0o0 阅读(36) 评论(0) 推荐(0)
摘要:错误 Error updating database. Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed ### The error 阅读全文
posted @ 2021-11-27 10:59 江南0o0 阅读(447) 评论(0) 推荐(0)
摘要:错误 Error creating bean with name 'transactionManager' defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested except 阅读全文
posted @ 2021-11-27 10:56 江南0o0 阅读(1573) 评论(0) 推荐(0)
摘要:两种方式 声明式事物:aop 编程式事物:就是在代码中手动添加事物 声明式事物 只需要在spring-dao.xml配置即可(注意需要假如相关约束) <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframe 阅读全文
posted @ 2021-11-27 10:49 江南0o0 阅读(49) 评论(0) 推荐(0)
摘要:错误 Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested excepti 阅读全文
posted @ 2021-11-27 09:46 江南0o0 阅读(496) 评论(0) 推荐(0)
摘要:需要导入的依赖 <dependencies> <!-- spring整合mybatis导入的依赖--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scop 阅读全文
posted @ 2021-11-26 17:43 江南0o0 阅读(46) 评论(0) 推荐(0)
摘要:这个错误废了我好多时间,记录一下 错误 原因: spring自带的name属性和配置文件的name属性重合了,然后配置文件的name就被覆盖掉了 解决办法 1.在导入配置文件的标签后面添加一个属性:system-properties-mode="FALLBACK" <context:property 阅读全文
posted @ 2021-11-26 17:00 江南0o0 阅读(84) 评论(0) 推荐(0)
摘要:@Aspect表明这是一个切面类 package com.kuang.diy; /** * @author Administrator * @description: TODO * @date 2021/11/26 13:46 */ import org.aspectj.lang.Proceedin 阅读全文
posted @ 2021-11-26 14:07 江南0o0 阅读(39) 评论(0) 推荐(0)
摘要:通过自定义类,切面来实现aop 要切入的方法类 package com.kuang.diy; public class DiyPoint { public void before(){ System.out.println(" 再方法之前执行了 "); } public void after(){ 阅读全文
posted @ 2021-11-26 12:17 江南0o0 阅读(289) 评论(0) 推荐(0)
摘要:使用aop需要导入的依赖 <!-- 使用aop需要导入的依赖--> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.9.4</version> </depend 阅读全文
posted @ 2021-11-26 11:53 江南0o0 阅读(115) 评论(0) 推荐(0)
摘要:@Component::组件,放在类上,表明这个类被spring管理,就是bean 衍生出三层架构,功能相近的三个注解 bean:@Component dao@Repository service@Service controller@Controller 这几个注解都表示该类被spring托管,功 阅读全文
posted @ 2021-11-25 16:05 江南0o0 阅读(38) 评论(0) 推荐(0)
摘要:1.在xml中配置 实体类 public class Student implements Serializable { private String name; private Address address; private String[] books; private List<String 阅读全文
posted @ 2021-11-25 14:38 江南0o0 阅读(63) 评论(0) 推荐(0)
摘要:单例模式(singleton):默认为单例,只能创建一个对象 当一个bean的作用域为Singleton,那么Spring IoC容器中只会存在一个共享的bean实例,并且所有对bean的请求,只要id与该bean定义相匹配,则只会返回bean的同一实例Singleton是单例类型,就是在创建起容器 阅读全文
posted @ 2021-11-25 14:00 江南0o0 阅读(62) 评论(0) 推荐(0)
摘要:第一种:构造器注入 第二种:set依赖注入 <!--di依赖注入--> <bean id="address" class="com.kuang.pojo.Address"> <property name="address" value="西安"></property> </bean> <bean i 阅读全文
posted @ 2021-11-25 12:53 江南0o0 阅读(37) 评论(0) 推荐(0)
摘要:<!-- spring创建对象的方式--> <!-- 第一种:调用无参构造器创建对象 <bean id="hello" class="com.kuang.pojo.User"> <property name="name" value="Spring"/> </bean> --> <!-- 第二种:有 阅读全文
posted @ 2021-11-25 10:26 江南0o0 阅读(56) 评论(0) 推荐(0)
摘要:第一步:自定义一个实现了HandlerInterceptor接口的类 重写其中的三个方法 package com.kuang.config; import org.springframework.web.servlet.HandlerInterceptor; import org.springfra 阅读全文
posted @ 2021-11-23 13:18 江南0o0 阅读(38) 评论(0) 推荐(0)
摘要:#第一步:导入json依赖 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.8</version> </dependen 阅读全文
posted @ 2021-11-20 16:10 江南0o0 阅读(49) 评论(0) 推荐(0)
摘要:json <script> var user ={ username:"小明", age:"10", sex:"男" }; // json是一个文本,也就是字符串 // 将js对象转换为json对象 var json = JSON.stringify(user); console.log(json) 阅读全文
posted @ 2021-11-20 14:46 江南0o0 阅读(32) 评论(0) 推荐(0)
摘要:#web.xml配置 <!--1.注册servlet--> <servlet> <servlet-name>SpringMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servl 阅读全文
posted @ 2021-11-20 10:21 江南0o0 阅读(76) 评论(0) 推荐(0)
摘要:第一步:创建实体类 public class Hello { private String str; 第二步;创建application.xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springfra 阅读全文
posted @ 2021-11-15 11:25 江南0o0 阅读(49) 评论(0) 推荐(0)
摘要:exception [Request processing failed; nested exception is java.lang.NullPoin 原因:查询数据的时候,俩张表的数据对不上 解决办法:删除多余的数据(目前水平有限) 阅读全文
posted @ 2021-11-14 15:39 江南0o0 阅读(554) 评论(0) 推荐(0)
摘要:1、Ctrl+N按名字搜索类 相当于eclipse的ctrl+shift+R,输入类名可以定位到这个类文件,就像idea在其它的搜索部分的表现一样,搜索类名也能对你所要搜索的内容多个部分进行匹配,而且如果能匹配的自己写的类,优先匹配自己写的类,甚至不是自己写的类也能搜索。 2、Ctrl+Shift+ 阅读全文
posted @ 2021-11-13 16:32 江南0o0 阅读(184) 评论(0) 推荐(0)
摘要:collection的一些方法 List list = new ArrayList(); //add 添加 list.add(1); list.add("你好"); list.add(true); System.out.println("list:" + list); //remove 删除:1.指 阅读全文
posted @ 2021-11-13 10:18 江南0o0 阅读(40) 评论(0) 推荐(0)
摘要:dDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception i 阅读全文
posted @ 2021-11-12 10:03 江南0o0 阅读(1336) 评论(0) 推荐(0)
摘要:在接口上方添加标签 @CacheNamespace(blocking = true) 阅读全文
posted @ 2021-11-11 09:13 江南0o0 阅读(35) 评论(0) 推荐(0)
摘要:一、一对一 实体类 //多对一(mybatis中称之为一对一)的映射:一个账户只能属于一个用户 private User user; public User getUser() { return user; } public void setUser(User user) { this.user = 阅读全文
posted @ 2021-11-11 08:53 江南0o0 阅读(105) 评论(0) 推荐(0)
摘要:实体类 //多对多的关系映射:一个角色可以赋予多个用户 private List<User> users; public List<User> getUsers() { return users; } public void setUsers(List<User> users) { this.use 阅读全文
posted @ 2021-11-10 10:44 江南0o0 阅读(93) 评论(0) 推荐(0)
摘要:一、在主表实体类创建从表实体的list集合(主表user,从表account) public class User implements Serializable { private Integer id; private String username; private String addres 阅读全文
posted @ 2021-11-10 09:35 江南0o0 阅读(41) 评论(0) 推荐(0)
摘要:一、实体类从表添加主表的对象(主表user,从表account) public class Account implements Serializable { private Integer id; private Integer uid; private double money; //添加主表对 阅读全文
posted @ 2021-11-10 09:01 江南0o0 阅读(54) 评论(0) 推荐(0)
摘要:if标签 <!-- 根据输入的参数进行查询 --> <select id="findUserByCondition" resultMap="userMap" parameterType="user"> select * from user where 1=1 <if test="userName ! 阅读全文
posted @ 2021-11-09 14:58 江南0o0 阅读(36) 评论(0) 推荐(0)
摘要:pom.xml代码 <!-- 配置打包方式--> <packaging>jar</packaging> <!-- 导入mybatis依赖--> <dependencies> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis 阅读全文
posted @ 2021-11-09 11:58 江南0o0 阅读(176) 评论(0) 推荐(0)
摘要:一、typeAliases <!--使用typeAliases配置别名,它只能配置domain中类的别名 --> <typeAliases> <!--typeAlias用于配置别名。type属性指定的是实体类全限定类名。alias属性指定别名,当指定了别名就再区分大小写 <typeAlias typ 阅读全文
posted @ 2021-11-09 11:28 江南0o0 阅读(334) 评论(0) 推荐(0)
摘要:<!-- 配置properties 可以在标签内部配置连接数据库的信息。也可以通过属性引用外部配置文件信息 resource属性: 常用的 用于指定配置文件的位置,是按照类路径的写法来写,并且必须存在于类路径下。 url属性: 是要求按照Url的写法来写地址 URL:Uniform Resource 阅读全文
posted @ 2021-11-09 11:04 江南0o0 阅读(255) 评论(0) 推荐(0)
摘要:package com.itheima.dao.impi; import com.itheima.dao.IUserDao; import com.itheima.domain.User; import org.apache.ibatis.session.SqlSession; import org 阅读全文
posted @ 2021-11-09 10:37 江南0o0 阅读(39) 评论(0) 推荐(0)
摘要:1.查询所有数据 接口代码 /** * 查询所有用户数据 * @return */ List<User> findAll(); xml配置文件代码 <!-- 查询所有用户--> <select id="findAll" resultType="com.itheima.domain.User"> se 阅读全文
posted @ 2021-11-08 16:39 江南0o0 阅读(93) 评论(0) 推荐(0)
摘要:1.把IUserDao,xml文件删除 2.在dao接口的方法上使用@select属性(括号内写需要查询的sql语句) @Select("select * from user") 3.还需要在SqlMapConfig,xml文件中,使用mapper的class属性,指定dao接口的权限定类名 <ma 阅读全文
posted @ 2021-11-08 11:56 江南0o0 阅读(42) 评论(0) 推荐(0)