四、dao
.java
package com.example.demo2.dao;import com.baomidou.mybatisplus.core.mapper.BaseMapper;import com.example.demo2.entity.User;import org.apache.ibatis.annotations.Param;import org.springframework.stereotype.Repository;import java.util.List;/*** @author sssr* @version 1.0* @Description:* @date 2019/2/16*/@Repositorypublic interface UserDao extends BaseMapper
.xml
文章插图
package com.example.demo2.service;import com.baomidou.mybatisplus.extension.service.IService;import com.example.demo2.entity.User;import java.util.List;/*** @author sssr* @version 1.0* @Description:* @date 2019/2/16*/public interface UserService extends IService
package com.example.demo2.service.impl;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;import com.example.demo2.dao.UserDao;import com.example.demo2.entity.User;import com.example.demo2.service.UserService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.cache.annotation.Cacheable;import org.springframework.stereotype.Service;import java.util.List;/*** @author sssr* @version 1.0* @Description:* @date 2019/2/16*/@Servicepublic class UserServiceImpl extends ServiceImpl
六、
package com.example.demo2.controller;import com.example.demo2.entity.User;import com.example.demo2.service.UserService;import org.apache.shiro.SecurityUtils;import org.apache.shiro.authc.UsernamePasswordToken;import org.apache.shiro.authz.annotation.RequiresPermissions;import org.apache.shiro.authz.annotation.RequiresRoles;import org.apache.shiro.subject.Subject;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestParam;import org.springframework.web.bind.annotation.RestController;import java.util.List;/*** @author sssr* @version 1.0* @Description:* @date 2019/2/16*/@RestController@RequestMapping("/user")public class UserController {@Autowiredprivate UserService userService;@GetMapping("/list")public List
- vs2019项目部署到阿里云服务器与iis配置
- centos7.4系统的虚拟机网络配置教程
- lv3 嵌入式开发-1linux介绍及环境配置
- 掘金领航者全自动付费进群系统代理端域名配置教程
- servlet配置
- SVN版本控制器的安装和配置以及一些技巧svn开机自启动
- 阿里云服务器配置个人用户怎么选?CPU内存带宽系统盘?
- 华为交换机——策略路由配置实战
- 【Linux下进程的CPU配置和线程绑定】
- 三 【Audio】配置文档audio_policy_conf.xml