J'émigre un projet qui a utilisé xml pour la cartographie de printemps démarrage(.java fichier)Modifier la configuration du xml au printemps démarrage
Comment dois-je aller à ce sujet? Voici la configuration xml Jackrabbit ...
<bean id="repository" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jcr/myRepository"/>
</bean>
<bean id="jcrSessionFactory" class="org.springmodules.jcr.JcrSessionFactory">
<property name="repository" ref="repository" />
<property name="credentials">
<bean class="javax.jcr.SimpleCredentials">
<constructor-arg index="0" value="admin" />
<!-- create the credentials using a bean factory -->
<constructor-arg index="1">
<bean factory-bean="password" factory-method="toCharArray" />
</constructor-arg>
</bean>
</property>
</bean>
<!-- create the password to return it as a char[] -->
<bean id="password" class="java.lang.String">
<constructor-arg index="0" value="admin" />
</bean>
<bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
<property name="sessionFactory" ref="jcrSessionFactory" />
<property name="allowCreate" value="true" />
</bean>
<Resource name="jcr/myRepository"
auth="Container"
type="javax.jcr.Repository"
factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
configFilePath="D:/DMSRepo/repositoryFactlive.xml"
repHomeDir="D:/DMSRepo/factlivetrialVersion2/repo"/>
Petit int 'class' référence une classe ... Ces choses que vous pouvez créer avec' new'. Commence avec ça. –