1
나는 내 응용 프로그램에서 oauth2
클래스 org.springframework.security.oauth2.provider.endpoint
Spring 파견 서블릿에서 <context : component-scan />을 구성하는 방법은 무엇입니까?
@RequestMapping(value = "/oauth/authorize", method = RequestMethod.POST)
public void approveOrDeny(@RequestParam("user_oauth_approval")
boolean approved,
HttpServletRequest request,
HttpServletResponse response) throws IOException,
ServletException {
....
}
의 컨트롤러 메서드를 호출합니다. 위의 클래스를 호출하기 위해이 함수를 사용했다. 결과는 "액세스 할 수 없음"이었습니다.
<context:component-scan base-package="org.stjude.ri.bwfp">
<context:include-filter type="regex" expression="org.springframework.security.oauth2.*"/>
<context:exclude-filter expression=".*_Roo_.*"
type="regex" />
<context:exclude-filter expression="org.springframework.stereotype.Controller"
type="annotation" />
</context:component-scan>
org.springframework.security.oauth2.provider.*
에서 컨트롤러 클래스 메서드를 어떻게 호출 할 수 있습니까?
다음 대답은 또한 도움이 될 수 있습니다 : ([@Service 두 번 구성된다] http://stackoverflow.com/a/4335438/814702) – informatik01