Witam
Testuje działanie potrójnej siły REST, Springa i JSON. Stworzyłem w ramach testu taką oto klasę:
@Controller
@RequestMapping("/kfc/brands")
public class TController {
@RequestMapping(value="{name}", method = RequestMethod.GET, headers="Accept=application/json")
public @ResponseBody car getShopInJSON(@PathVariable String name) {
Car c = new Car();
c.imie = name;
c.wiek = 15;
return c;
}
}
Po próbie deployu projektu na serwer dostaję :
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/java/project/spiros/controller/Car
Klasa Car to zwykłe POJO z seterami i getterami oraz konstruktorem. Nie mogę dość dlaczego coś mi się takiego sypie. Proszę o jakieś wskazówki.