From 73255be1f5e2788894891c6dc9145fd1cb95314e Mon Sep 17 00:00:00 2001 From: Chenx221 Date: Mon, 12 Jun 2023 11:01:26 +0800 Subject: [PATCH] =?UTF-8?q?Score=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Chenx221 --- .../chenx221/controller/ScoreController.java | 17 +++++++++++++++++ .../java/cyou/chenx221/mapper/ScoreDao.java | 7 +++++++ .../cyou/chenx221/mapper/impl/ScoreDaoImpl.java | 11 +++++++++++ .../cyou/chenx221/service/ScoreService.java | 13 +++++++++++++ .../src/main/resources/mapper/ScoreMapper.xml | 7 +++++++ 5 files changed, 55 insertions(+) create mode 100644 project2/src/main/java/cyou/chenx221/controller/ScoreController.java create mode 100644 project2/src/main/java/cyou/chenx221/mapper/ScoreDao.java create mode 100644 project2/src/main/java/cyou/chenx221/mapper/impl/ScoreDaoImpl.java create mode 100644 project2/src/main/java/cyou/chenx221/service/ScoreService.java create mode 100644 project2/src/main/resources/mapper/ScoreMapper.xml diff --git a/project2/src/main/java/cyou/chenx221/controller/ScoreController.java b/project2/src/main/java/cyou/chenx221/controller/ScoreController.java new file mode 100644 index 0000000..77c9908 --- /dev/null +++ b/project2/src/main/java/cyou/chenx221/controller/ScoreController.java @@ -0,0 +1,17 @@ +package cyou.chenx221.controller; + +import cyou.chenx221.service.ScoreService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/score") +public class ScoreController { + private final ScoreService scoreService; + + @Autowired + public ScoreController(ScoreService scoreService) { + this.scoreService = scoreService; + } +} diff --git a/project2/src/main/java/cyou/chenx221/mapper/ScoreDao.java b/project2/src/main/java/cyou/chenx221/mapper/ScoreDao.java new file mode 100644 index 0000000..86fb118 --- /dev/null +++ b/project2/src/main/java/cyou/chenx221/mapper/ScoreDao.java @@ -0,0 +1,7 @@ +package cyou.chenx221.mapper; + +import org.springframework.stereotype.Repository; + +@Repository +public interface ScoreDao { +} diff --git a/project2/src/main/java/cyou/chenx221/mapper/impl/ScoreDaoImpl.java b/project2/src/main/java/cyou/chenx221/mapper/impl/ScoreDaoImpl.java new file mode 100644 index 0000000..13f242b --- /dev/null +++ b/project2/src/main/java/cyou/chenx221/mapper/impl/ScoreDaoImpl.java @@ -0,0 +1,11 @@ +package cyou.chenx221.mapper.impl; + +import cyou.chenx221.mapper.ScoreDao; +import org.apache.ibatis.session.SqlSession; +import org.springframework.stereotype.Repository; + +@Repository +public class ScoreDaoImpl implements ScoreDao { + private SqlSession sqlSession; + +} diff --git a/project2/src/main/java/cyou/chenx221/service/ScoreService.java b/project2/src/main/java/cyou/chenx221/service/ScoreService.java new file mode 100644 index 0000000..c432d71 --- /dev/null +++ b/project2/src/main/java/cyou/chenx221/service/ScoreService.java @@ -0,0 +1,13 @@ +package cyou.chenx221.service; + +import cyou.chenx221.mapper.ScoreDao; +import org.springframework.stereotype.Service; + +@Service +public class ScoreService { + private ScoreDao scoreDao; + + public ScoreService(ScoreDao scoreDao) { + this.scoreDao = scoreDao; + } +} diff --git a/project2/src/main/resources/mapper/ScoreMapper.xml b/project2/src/main/resources/mapper/ScoreMapper.xml new file mode 100644 index 0000000..2ffba4b --- /dev/null +++ b/project2/src/main/resources/mapper/ScoreMapper.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file