d3c184991485e4c7ccf007e77e74939cfe14a370
[JavaForFun] /
1 package de.spring.example.rest.controllers;
2
3 import javax.inject.Inject;
4
5 import org.resthub.web.controller.ServiceBasedRestController;
6 import org.springframework.web.bind.annotation.RequestMapping;
7 import org.springframework.web.bind.annotation.RestController;
8
9 import de.spring.example.persistence.domain.AdDescription;
10 import de.spring.example.services.AdDescriptionService;
11
12 @RestController
13 @RequestMapping("/ad-descriptions/")
14 public class AdDescriptionController extends ServiceBasedRestController<AdDescription, Long, AdDescriptionService> {
15         
16         @Override
17         @Inject
18     public void setService(AdDescriptionService adDescriptionService) {
19         this.service = adDescriptionService;
20     }
21
22         // I do not have to do anything here because all I need is implemented by ServiceBasedRestController :)
23 }