spring - RequestMapping and Controller annotations. Controller is not being hit -
i've controller @controller , @requestmapping annotations.
@controller @requestmapping(value = "/copyrightversion") public class copyrightandversioncontroller extends basecontroller { protected copyrightandversioncontroller() { super(copyrightandversioncontroller.class); } /** * reads copyright , version respective files. * * @return model , view */ @requestmapping(value = "/getversion", method = requestmethod.get) public modelandview getcopyrightandversion() { logger.debug("in getcopyrightandversion method"); modelandview mav = new modelandview("copyrightandversion"); mav.getmodelmap().put("copyright", "test copyright"); mav.getmodelmap().put("version", "test version"); return mav; } }
in logs see
dispatcherservlet name 'xtreme' processing request [/xtreme/copyrightversion/getversion.do] looking handler method path /copyrightversion/getversion.do returning handler method [public org.springframework.web.servlet.modelandview com.xtreme.controller.copyrightandversioncontroller.getcopyrightandversion()] tablebeanfactory] - returning cached instance of singleton bean 'copyrightandversioncontroller' last-modified value [/xtreme/copyrightversion/getversion.do] is: -1 completed request
it never hits controller's method getcopyrightandversion() though dispatcherservlet correctly identified handler this. doesn't print message in log. in remote debugging not hit.
am missing something?
Comments
Post a Comment