随笔分类 - Java基础
摘要:> commit 首次要填Gitee的账号密码
阅读全文
摘要:实体类 @Data @AllArgsConstructor @NoArgsConstructor @TableName("t_user") public class RUser { @TableId(value="usr_id",type = IdType.AUTO) private Integer
阅读全文
摘要:shiro是apache的一个开源框架,是一个权限管理的框架,实现认证、授权、加密、会话管理。 shiro优势举例 易用:相当于其他安全框架,shiro比较简单易用。 使用非常广泛,资料好找。 灵活:可以工作在很多环境 。 web支持:对web的支持好, 如thymeleaf标签支持。 支持:应用广
阅读全文
摘要:实体类 @Data @AllArgsConstructor @NoArgsConstructor @TableName("t_user") public class RUser { @TableId(value="id",type = IdType.AUTO) private Integer usr
阅读全文
摘要:一. 项目创建及配置 1.项目创建 点击finish完成创建 pom.xml 加上以下依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version
阅读全文
摘要:pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
阅读全文
摘要:Aop:面向切面,在不修改代码的前提下对方法进行增强 pom.xml <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version
阅读全文
摘要:pom.xml <dependencies> <!--spring与Mybatis整合--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.
阅读全文
摘要:dao层 public interface UserDao { void insertUser(); } 实现类 /*@Component(value = "userDao") 配置到实例里去 或者直接用下面的Repository*/ @Repository("userDao") public cl
阅读全文
摘要:UserMapper public interface UserMapper { /*注解实现增删改查*/ @Select("select * from tb_user") List<User> selectAll2(); @Insert("insert into tb_user values(nu
阅读全文
摘要:一对一 一个员工对应一个部门 实体类 emp package com.entity; import java.io.Serializable; import java.math.BigDecimal; public class EmpVo implements Serializable { priv
阅读全文
摘要:BrandMapper.java public interface BrandMapper { List<Brand> selectAll(); //查询所有 Brand selectBrandById(int id);//根据id查询 void insertBrand(Brand brand);/
阅读全文
摘要:mybatis动态代理: 1、创建(UserMapper)Mapper接口,创建相同名称Mapper.xml映射文件,并且保证映射文件和Mapper接口在同一路径下 2、Mapper.xml映射文件的命名空间和接口的全路径一致 <mapper namespace="com.mapper.UserMa
阅读全文
摘要:什么是MyBatis? MyBatis 是一款优秀的持久层框架,用于简化 JDBC 开发 MyBatis 本是 Apache 的一个开源项目iBatis, 2010年这个项目由apache software foundation 迁移到了google code,并且改名为MyBatis 。2013年
阅读全文
摘要:302 302 Found是HTTP协议中的一个状态码(Status Code),可以简单的理解为该资源原本确实存在,但已经被临时改变了位置; 或者换个说法,就是临时的存在于某个临时URL下。通常会发送Header来暂时重定向到新的新位置。 问题原因 本地debug发现后端没有报错,看前后端接口时,
阅读全文
摘要:pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
阅读全文