java - Configuring SSL Restlet server with Spring IoC? -


so, google being unhelpful today.

there's this page, shows how set ssl restlet in code.

how do in spring xml?

here's have now:

<bean id="container" class="org.restlet.ext.spring.springcomponent">             <property name="server">                     <bean class="org.restlet.ext.spring.springserver">                             <constructor-arg value="http" />                             <constructor-arg value="3080" />                     </bean>              </property>                  <property name="defaulttarget" ref="router"/>     </bean>  

i use constructor args "https" , "3443", how set keystore location server key , password , type , yadda yadda yadda?

how example?

java:

import org.restlet.resource.get; import org.restlet.resource.serverresource; import org.springframework.context.support.classpathxmlapplicationcontext;  public class restletapplication extends serverresource {     @get     public string present() {         return "hello, world";     }      public static void main(string... args) throws exception {         new classpathxmlapplicationcontext("restlet-context.xml").registershutdownhook();     } } 

spring:

<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">      <bean id="top" class="org.restlet.ext.spring.springcomponent" init-method="start" destroy-method="stop">         <property name="server">             <bean class="org.restlet.ext.spring.springserver">                 <constructor-arg value="https"/>                 <constructor-arg value="8183"/>                 <property name="parameters">                     <props>                         <prop key="sslcontextfactory">org.restlet.engine.ssl.defaultsslcontextfactory</prop>                         <prop key="keystorepath">/my/path/to/serverx.jks</prop>                         <prop key="keystorepassword">password</prop>                         <prop key="keypassword">password</prop>                         <prop key="keystoretype">jks</prop>                     </props>                 </property>             </bean>         </property>         <property name="defaulttarget">             <bean class="org.restlet.ext.spring.springrouter">                 <property name="attachments">                     <map>                         <entry key="/v1" value="restletapplication"/>                     </map>                 </property>             </bean>         </property>     </bean> </beans> 

seems work restlets 2.3.4.

based on:


Comments