2017-05-29 10 views
0

wir eine Ameise migrieren basierend Feder 3.1 App basiert Feder 4.3.8 Maven. Wir verschlüsseln unsere Property-Datei-Einträge mit Jasypt 1.9.2. Wenn jedoch die App gestartet wird, führt esIst Jasypt 1.9.2 kompatibel mit Feder 4.3.8?

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer] for bean with name 'propertyPlaceholderConfigurer' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer 

jasypt-1.9.2 und jasypt-spring31-1.9.2 Gläser unter WEB-INF/lib Ordner zur Verfügung stehen. Unten ist der Anwendungskontext:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:mvc="http://www.springframework.org/schema/mvc" 
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xsi:schemaLocation=" 
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd 
     http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd 
     http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> 

    <mvc:annotation-driven /> 
    <mvc:resources mapping="*.html" location="/" /> 

    <context:component-scan base-package="com.xyz" /> 
    <bean id="propertyPlaceholderConfigurer" 
     class="org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer"> 
     <constructor-arg ref="configurationEncryptor" /> 
    </bean> 

    <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor"> 
     <property name="config" ref="environmentVariablesConfiguration" /> 
    </bean> 

    <bean id="environmentVariablesConfiguration" 
     class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig"> 
     <property name="algorithm" value="PBEWithMD5AndDES" /> 
     <property name="password" value="xxxx" /> 
    </bean> 
</beans> 

Maven Eintrag:

<dependency> 
     <groupId>org.jasypt</groupId> 
     <artifactId>jasypt-spring31</artifactId> 
     <version>1.9.2</version> 
</dependency> 

Antwort

0

Nein. Nach http://jasypt.org/encrypting-configuration.html:

Frühling integrierte transparente Entschlüsselung .properties Dateien: Jasypt ins Konfiguration integrieren System des Spring Framework (2.x und 3.x) und transparent entschlüsseln .properties Dateien von Spring-Anwendungen verwendet. Weitere Informationen: Frühling 2.x, Frühling 3.0, Frühling 3.1.

Verwandte Themen