abel533 / Mybatis-Spring

这是一个集成了Mybatis分页插件和通用Mapper的示例项目
943 stars 610 forks source link

在controller中注入的service是实现类而不是接口吗? #5

Open shuzheng opened 9 years ago

shuzheng commented 9 years ago
@Service
public class UserServiceImpl extends BaseService<User> implements IUserService {

}
@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserServiceImpl userService;
}
abel533 commented 9 years ago

都行。