Compare commits
8 Commits
1a3fd149ab
...
23045a903a
| Author | SHA1 | Date |
|---|---|---|
|
|
23045a903a | 2 months ago |
|
|
75ae6ccd6d | 2 months ago |
|
|
223c4b3293 | 2 months ago |
|
|
1ba81beb0a | 2 months ago |
|
|
a89b72fca1 | 2 months ago |
|
|
99128aa40c | 2 months ago |
|
|
d61a2422b6 | 2 months ago |
|
|
4255361b8d | 2 months ago |
@ -0,0 +1,13 @@
|
||||
# 忽略 Maven/Gradle 构建产物
|
||||
target/
|
||||
build/
|
||||
|
||||
# 忽略 IDE 生成的配置文件(以 IntelliJ 为例)
|
||||
.idea/
|
||||
*.iml
|
||||
*.iws
|
||||
*.ipr
|
||||
|
||||
# 忽略系统自动生成的文件
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
@ -0,0 +1,51 @@
|
||||
package cn.zyp.stusystem.common;
|
||||
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.exception.NotPermissionException;
|
||||
import cn.dev33.satoken.exception.NotRoleException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import javax.naming.AuthenticationException;
|
||||
import java.nio.file.AccessDeniedException;
|
||||
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
// 处理SaToken未登录异常
|
||||
@ExceptionHandler(NotLoginException.class)
|
||||
public Result<Void> handleNotLoginException(NotLoginException e) {
|
||||
return Result.error(401, "未登录或登录已过期");
|
||||
}
|
||||
|
||||
// 处理SaToken权限不足异常
|
||||
@ExceptionHandler(NotPermissionException.class)
|
||||
public Result<Void> handleNotPermissionException(NotPermissionException e) {
|
||||
return Result.error(403, "无权限访问");
|
||||
}
|
||||
|
||||
// 处理SaToken角色不足异常
|
||||
@ExceptionHandler(NotRoleException.class)
|
||||
public Result<Void> handleNotRoleException(NotRoleException e) {
|
||||
return Result.error(403, "无角色权限");
|
||||
}
|
||||
|
||||
// 处理其他认证异常
|
||||
@ExceptionHandler(AuthenticationException.class)
|
||||
public Result<Void> handleException(AuthenticationException e){
|
||||
return Result.error(401, e.getMessage());
|
||||
}
|
||||
|
||||
// 处理其他权限不足异常
|
||||
@ExceptionHandler(AccessDeniedException.class)
|
||||
public Result<Void> handleAccessDeniedException(AccessDeniedException e) {
|
||||
return Result.error(403, e.getMessage());
|
||||
}
|
||||
|
||||
// 处理其他未知异常
|
||||
@ExceptionHandler(Exception.class)
|
||||
public Result<Void> handleException(Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error(500, "服务器内部错误");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.zyp.stusystem.common;
|
||||
|
||||
|
||||
public enum ResultCode {
|
||||
SUCCESS(200,"成功"),
|
||||
ERROR(500,"错误"),
|
||||
PARAM_ERROR(400,"参数错误");
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
ResultCode(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package cn.zyp.stusystem.config;
|
||||
|
||||
import cn.dev33.satoken.filter.SaServletFilter;
|
||||
import cn.dev33.satoken.util.SaResult;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class SaTokenConfig {
|
||||
|
||||
@Bean
|
||||
public SaServletFilter getSaServletFilter() {
|
||||
return new SaServletFilter()
|
||||
.addInclude("/**")
|
||||
.addExclude("/favicon.ico")
|
||||
.setAuth(obj -> {
|
||||
// 这里不需要写权限校验,让注解来处理
|
||||
// SaRouter.match("/**").notMatch("/api/login").check(StpUtil::checkLogin);
|
||||
})
|
||||
.setError(e -> {
|
||||
return SaResult.error(e.getMessage());
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package cn.zyp.stusystem.config;
|
||||
|
||||
import cn.dev33.satoken.stp.StpInterface;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class StpInterfaceImpl implements StpInterface {
|
||||
|
||||
@Override
|
||||
public List<String> getPermissionList(Object loginId, String loginType) {
|
||||
// 从Session获取权限
|
||||
return (List<String>) StpUtil.getSessionByLoginId(loginId).get("permissions");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRoleList(Object loginId, String loginType) {
|
||||
String role = (String) StpUtil.getSessionByLoginId(loginId).get("role");
|
||||
return Arrays.asList(role);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package cn.zyp.stusystem.constant;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
// constant/PermissionConstants.java
|
||||
public class PermissionConstants {
|
||||
public static final String ROLE_ADMIN = "admin";
|
||||
public static final String ROLE_HEAD_TEACHER = "head_teacher";
|
||||
public static final String ROLE_TEACHER = "teacher";
|
||||
|
||||
public static final String CLASS_VIEW = "class:view";
|
||||
public static final String CLASS_ADD = "class:add";
|
||||
public static final String CLASS_EDIT = "class:edit";
|
||||
public static final String CLASS_DELETE = "class:delete";
|
||||
|
||||
public static final String STUDENT_VIEW = "student:view";
|
||||
public static final String STUDENT_ADD = "student:add";
|
||||
public static final String STUDENT_EDIT = "student:edit";
|
||||
public static final String STUDENT_DELETE = "student:delete";
|
||||
|
||||
public static final Map<String, List<String>> ROLE_PERMISSIONS = new HashMap<>();
|
||||
|
||||
static {
|
||||
ROLE_PERMISSIONS.put(ROLE_ADMIN, Arrays.asList(
|
||||
CLASS_VIEW, CLASS_ADD, CLASS_EDIT, CLASS_DELETE,
|
||||
STUDENT_VIEW, STUDENT_ADD, STUDENT_EDIT, STUDENT_DELETE
|
||||
));
|
||||
|
||||
ROLE_PERMISSIONS.put(ROLE_HEAD_TEACHER, Arrays.asList(
|
||||
CLASS_VIEW,
|
||||
STUDENT_VIEW, STUDENT_ADD, STUDENT_EDIT, STUDENT_DELETE
|
||||
));
|
||||
|
||||
ROLE_PERMISSIONS.put(ROLE_TEACHER, Arrays.asList(
|
||||
CLASS_VIEW,
|
||||
STUDENT_VIEW
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package cn.zyp.stusystem.controller;
|
||||
|
||||
import cn.zyp.stusystem.common.Result;
|
||||
import cn.zyp.stusystem.entity.Permission;
|
||||
import cn.zyp.stusystem.service.PermissionService;
|
||||
import cn.zyp.stusystem.vo.PermissionVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/permission")
|
||||
public class PermissionController {
|
||||
|
||||
@Autowired
|
||||
private PermissionService permissionService;
|
||||
|
||||
/**
|
||||
* 获取所有权限列表
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public Result<List<PermissionVO>> getAllPermissions() {
|
||||
List<Permission> permissions = permissionService.getAllEnabledPermissions();
|
||||
List<PermissionVO> voList = permissions.stream()
|
||||
.map(permission -> {
|
||||
PermissionVO vo = new PermissionVO();
|
||||
BeanUtils.copyProperties(permission, vo);
|
||||
return vo;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
return Result.success(voList);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package cn.zyp.stusystem.controller;
|
||||
|
||||
import cn.zyp.stusystem.common.Result;
|
||||
import cn.zyp.stusystem.dto.SaveRolePermissionsDTO;
|
||||
import cn.zyp.stusystem.service.RolePermissionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/role")
|
||||
public class RolePermissionController {
|
||||
|
||||
@Autowired
|
||||
private RolePermissionService rolePermissionService;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package cn.zyp.stusystem.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.zyp.stusystem.common.Result;
|
||||
import cn.zyp.stusystem.dto.UserSimpleDTO;
|
||||
import cn.zyp.stusystem.entity.User;
|
||||
import cn.zyp.stusystem.service.UserService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/user")
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("class:edit") // 或者更宽松的权限
|
||||
@GetMapping("/teachers")
|
||||
public Result<List<UserSimpleDTO>> listTeachers() {
|
||||
List<UserSimpleDTO> teachers = userService.list(
|
||||
new LambdaQueryWrapper<User>()
|
||||
.in(User::getRole, Arrays.asList("head_teacher", "teacher"))
|
||||
.eq(User::getStatus, 1)
|
||||
.select(User::getId, User::getName)
|
||||
).stream()
|
||||
.map(u -> new UserSimpleDTO(u.getId(), u.getName()))
|
||||
.collect(Collectors.toList());
|
||||
return Result.success(teachers);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户的权限列表
|
||||
*/
|
||||
@GetMapping("/permissions")
|
||||
public Result<List<String>> getUserPermissions() {
|
||||
// 从Token中获取当前用户ID
|
||||
Long userId = StpUtil.getLoginIdAsLong();
|
||||
List<String> permissions = userService.getUserPermissions(userId);
|
||||
return Result.success(permissions);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.zyp.stusystem.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LoginDTO {
|
||||
private String username;
|
||||
private String password;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.zyp.stusystem.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SaveRolePermissionsDTO {
|
||||
private List<String> permissions; // 权限码列表
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.zyp.stusystem.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserSimpleDTO {
|
||||
private Long id;
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.zyp.stusystem.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("roles")
|
||||
public class Role {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private String roleCode;
|
||||
private String roleName;
|
||||
private Integer status;
|
||||
private String remark;
|
||||
|
||||
// 前端期望字段名是 createTime
|
||||
@JsonProperty("createTime")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@JsonProperty("updateTime")
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package cn.zyp.stusystem.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@TableName("role_permissions")
|
||||
public class RolePermission {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private Long roleId; // 角色ID
|
||||
private String permissionCode; // 权限码
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.zyp.stusystem.mapper;
|
||||
|
||||
import cn.zyp.stusystem.entity.Permission;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface PermissionMapper extends BaseMapper<Permission> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.zyp.stusystem.mapper;
|
||||
|
||||
import cn.zyp.stusystem.entity.User;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.zyp.stusystem.service;
|
||||
|
||||
import cn.zyp.stusystem.entity.Permission;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PermissionService extends IService<Permission> {
|
||||
/**
|
||||
* 获取所有启用的权限
|
||||
*/
|
||||
List<Permission> getAllEnabledPermissions();
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package cn.zyp.stusystem.service;
|
||||
|
||||
import cn.zyp.stusystem.entity.Role;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
public interface RoleService extends IService<Role> {
|
||||
/**
|
||||
* 根据角色代码获取角色ID
|
||||
*/
|
||||
Long getRoleIdByRoleCode(String roleCode);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.zyp.stusystem.service.impl;
|
||||
|
||||
import cn.zyp.stusystem.entity.Permission;
|
||||
import cn.zyp.stusystem.mapper.PermissionMapper;
|
||||
import cn.zyp.stusystem.service.PermissionService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission>
|
||||
implements PermissionService {
|
||||
|
||||
@Override
|
||||
public List<Permission> getAllEnabledPermissions() {
|
||||
return list(new LambdaQueryWrapper<Permission>()
|
||||
.eq(Permission::getStatus, 1)
|
||||
.orderByAsc(Permission::getModule, Permission::getSortOrder)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package cn.zyp.stusystem.service.impl;
|
||||
|
||||
import cn.zyp.stusystem.entity.RolePermission;
|
||||
import cn.zyp.stusystem.mapper.RolePermissionMapper;
|
||||
import cn.zyp.stusystem.service.RolePermissionService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission>
|
||||
implements RolePermissionService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RolePermissionMapper rolePermissionMapper;
|
||||
|
||||
@Override
|
||||
public List<String> getPermissionCodesByRoleId(Long roleId) {
|
||||
if (roleId == null) {
|
||||
return List.of();
|
||||
}
|
||||
// 使用MyBatis-Plus的LambdaQueryWrapper查询
|
||||
List<RolePermission> list = list(new LambdaQueryWrapper<RolePermission>()
|
||||
.eq(RolePermission::getRoleId, roleId)
|
||||
.select(RolePermission::getPermissionCode) // 只查询permission_code字段
|
||||
);
|
||||
// 提取permissionCode
|
||||
return list.stream()
|
||||
.map(RolePermission::getPermissionCode)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getPermissionCodesByRoleIds(List<Long> roleIds) {
|
||||
if (roleIds == null || roleIds.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
// 使用MyBatis-Plus的in查询
|
||||
List<RolePermission> list = list(new LambdaQueryWrapper<RolePermission>()
|
||||
.in(RolePermission::getRoleId, roleIds)
|
||||
.select(RolePermission::getPermissionCode) // 只查询permission_code字段
|
||||
);
|
||||
// 提取permissionCode并去重
|
||||
return list.stream()
|
||||
.map(RolePermission::getPermissionCode)
|
||||
.distinct() // 去重
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveRolePermissions(Long roleId, List<String> permissionCodes) {
|
||||
// 1. 删除该角色的所有权限
|
||||
LambdaQueryWrapper<RolePermission> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(RolePermission::getRoleId, roleId);
|
||||
rolePermissionMapper.delete(wrapper);
|
||||
|
||||
// 2. 批量插入新权限
|
||||
if (permissionCodes != null && !permissionCodes.isEmpty()) {
|
||||
List<RolePermission> rolePermissions = permissionCodes.stream()
|
||||
.map(code -> {
|
||||
RolePermission rp = new RolePermission();
|
||||
rp.setRoleId(roleId);
|
||||
rp.setPermissionCode(code);
|
||||
rp.setCreatedAt(LocalDateTime.now());
|
||||
return rp;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
this.saveBatch(rolePermissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.zyp.stusystem.service.impl;
|
||||
|
||||
import cn.zyp.stusystem.entity.Role;
|
||||
import cn.zyp.stusystem.mapper.RoleMapper;
|
||||
import cn.zyp.stusystem.service.RoleService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
|
||||
|
||||
@Override
|
||||
public Long getRoleIdByRoleCode(String roleCode) {
|
||||
Role role = getOne(new LambdaQueryWrapper<Role>()
|
||||
.eq(Role::getRoleCode, roleCode)
|
||||
.eq(Role::getStatus, 1)
|
||||
);
|
||||
return role != null ? role.getId() : null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package cn.zyp.stusystem.vo;
|
||||
|
||||
import cn.zyp.stusystem.vo.UserVO;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LoginResult {
|
||||
private String token;
|
||||
private UserVO userInfo;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package cn.zyp.stusystem.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PermissionVO {
|
||||
private String code; // 权限码
|
||||
private String name; // 权限名称
|
||||
private String module; // 所属模块
|
||||
private String moduleName; // 模块名称
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/student_management?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
|
||||
# MyBatis-Plus ??
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml # Mapper.xml ????
|
||||
type-aliases-package: com.example.student.entity # ??????
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # ??SQL?????????
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue