增加User项目结构

This commit is contained in:
KilLze
2025-12-27 17:37:35 +08:00
parent a6716e32b6
commit 55c7c9a03a
5 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package com.bao.dating.controller;
import com.bao.dating.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
}

View File

@@ -0,0 +1,7 @@
package com.bao.dating.mapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UserMapper {
}

View File

@@ -0,0 +1,4 @@
package com.bao.dating.service;
public interface UserService {
}

View File

@@ -0,0 +1,13 @@
package com.bao.dating.service.impl;
import com.bao.dating.mapper.UserMapper;
import com.bao.dating.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bao.dating.mapper.UserMapper">
</mapper>