All Mapping info in Rest using Spring -
i creating rest api using spring mvc. want create rest api list uri mapping (from controller class) , there basic mapping information requestmethod, mediatype, , other mapping information document user uses rest api.
currently have used component-scan tag
<context-component-scan base-package="..." use-default-filter="false"> <context:include-filter type="annotation" expression="org.springframework.stereotype.controller" /> </context-component-scan>
and trying access instance of requestmappinghandlermapping since has such data wasn't able to.
my first question
using component scan tag spring provide instance of requestmappinghandlermapping can somehow autowire of controller class ?
then have used requestmappinghandlermapping externally bean in distacher servlet.
<bean name='handlermapping' class='org.springframework.web.servlet.mvc.method.annotation.requestmappinghandlermapping'> <property name='usetrailingslashmatch' value='false'></property> </bean>
second question
right of doing so. gives me every uri twice (repetition of uri)how avoid ?
Comments
Post a Comment