我在客户端使用Spring RESTTemplate来调用REST端点.在这种情况下,客户端是Spring应用程序,Tomcat是servlet容器.
我遇到了与HTTPS端点建立连接的问题.我收到一个错误,表明它找不到信任库的有效路径.我在哪里可以指定这个?这是在容器级别还是应用程序配置(Spring)级别完成的?
堆栈跟踪:
org.springframework.web.client.ResourceAccessException: I/O error:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target;
nested exception is javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:330)
org.springframework.web.client.RestTemplate.execute(RestTemplate.java:292)
org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:227)
Run Code Online (Sandbox Code Playgroud) 我想要做的是有一个公共的Service类,它有各种方法,如"search""retriveByID"等.理想情况下,这个类将使用服务参数并填充请求对象并交给相应的数据源处理程序.
我想根据被搜索的域对象将服务类实例化为具有不同请求处理程序的Spring bean.然后使用bean BeanNameUrlHandlerMapping根据URL调用不同的Service类.
<bean name="/sequence/*" class="org.dfci.cccb.services.SearchServiceImpl">
<property name="searchHandler">
....
Run Code Online (Sandbox Code Playgroud)
我的问题是,当我尝试这样做时,我不能使用方法级别的RequestMapping注释来选择服务类的适当方法.
@RequestMapping("*/search/")
QueryResult search(...
Run Code Online (Sandbox Code Playgroud)
或者可以通过bean定义注入注释值吗?
更新 还有关于此主题的Springsource文章:http: //blog.springsource.com/2008/03/23/using-a-hybrid-annotations-xml-approach-for-request-mapping-in-spring-mvc /
我已经配置了 grails saml 插件并加载 SP 元数据文件。当我尝试访问应用程序上受保护的资源时,出现以下错误。我似乎找不到任何有关它的信息。
Metadata for entity testing-app and role {urn:oasis:names:tc:SAML:2.0:metadata}SPSSODescriptor wasn't found