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