Score相关
Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
parent
e7e36054e2
commit
73255be1f5
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package cyou.chenx221.mapper;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface ScoreDao {
|
||||||
|
}
|
@ -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;
|
||||||
|
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
7
project2/src/main/resources/mapper/ScoreMapper.xml
Normal file
7
project2/src/main/resources/mapper/ScoreMapper.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?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="cyou.chenx221.mapper.CourseDao">
|
||||||
|
|
||||||
|
</mapper>
|
Reference in New Issue
Block a user