CREATE TABLE `demo` (
`id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
INSERT INTO `demo` VALUES ('1', 'v_v');
/**
* @ClassName Demo
* @Description TODO
* @Author V_V
* @Date 2020/5/18 19:24
* @Version 1.0
**/
@Data
@TableName("demo")
public class Demo{
@TableId(value = "id", type = IdType.UUID)
private String id;
@TableField("name")
private String name;
}
package com.ruoyi.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.api.domain.Demo;
/**
* @ClassName DemoMapper
* @Description TODO
* @Author V_V
* @Date 2020/5/18 19:30
* @Version 1.0
**/
public interface DemoMapper extends BaseMapper
}
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.api.domain.Demo;
/**
* @ClassName DemoService
* @Description TODO
* @Author V_V
* @Date 2020/5/18 19:32
* @Version 1.0
**/
public interface DemoService extends IService
}
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.api.domain.Demo;
import com.ruoyi.api.mapper.DemoMapper;
import com.ruoyi.api.service.DemoService;
import org.springframework.stereotype.Service;
/**
* @ClassName DemoServiceImpl
* @Description TODO
* @Author V_V
* @Date 2020/5/18 19:32
* @Version 1.0
**/
@Service
public class DemoServiceImpl extends ServiceImpl
}
IDEA 安装maven Helper插件
当Maven Helper 插件安装成功后,打开项目中的pom文件,下面就会多出一个试图
切换到此试图即可进行相应操作:
当前界面上还提供搜索功能 方便使用
把mybatis SqlSessionFactory修改为mybatis-plus的MybatisSqlSessionFactoryBean
8.配置好权限请求成功