다음과 같이 낙타 컨텍스트 외부의 낙타 청사진에서 JASYPT를 사용하여 속성을 해독하려고합니다. 낙타 컨텍스트 외부에서 JASYPT + Property Component를 사용할 수 있습니까? 사용자 이름 [SMX] 또는 암호가 잘못되었습니다낙타 컨텍스트 외부에서 JASYPT 사용
나는
그것은 ava.lang.SecurityException가오류 다음 날주고있다
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<cm:property-placeholder id="prop" persistent-id="mypersistent">
<!-- list some properties for this test -->
<cm:default-properties>
<cm:property name="cool.result" value="ENC(jU1ypXF709gpmOsJ2nKGgTbtd3oAs0n3rUNxEmMp2G8=)"/>
<cm:property name="jms.password" value="ENC(QhKlLI3eMKUhsUSPEWIRFw==)"/>
</cm:default-properties>
</cm:property-placeholder>
<bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
<property name="location" value="blueprint:prop"/>
<property name="propertiesParser" ref="jasypt"></property>
</bean>
<!-- define the jasypt properties parser with the given password to be used -->
<bean id="jasypt" class="org.apache.camel.component.jasypt.JasyptPropertiesParser">
<property name="password" value="secret"/>
</bean>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://127.0.0.1:61616" />
<property name="userName" value="smx"/>
<property name="password" value="${jms.password}"/>
</bean>
</property>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<!-- define the camel properties placeholder, and let it leverage jasypt -->
<!--<propertyPlaceholder id="properties"
location="blueprint:prop"
propertiesParserRef="jasypt"/>-->
<route>
<from uri="file://inputfolder"/>
<log message="jms password {{jms.password}}"/>
<setBody><constant>Foo message</constant></setBody>
<to uri="jms:queue:default.inputchannel?jmsMessageType=Text&transferExchange=true"/>
<to uri="{{cool.result}}"/>
</route>
</camelContext>
servciemix 5.0.0을 사용하고 있습니다. at org.apache.activemq.security.JaasAuthenticationBroker.addConnection (JaasAuthenticationBroker.java:80) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.broker.MutableBrokerFilter.addConnection (MutableBrokerFilter.java:97)[84:org.apache.activemq.activemq-osgi:5.9.0] at org.apache.activemq.broker.TransportConnection.processAddConnection (TransportConnection.java:733) [84 : org.apache .activemq.activemq-osgi : 5.9.0] at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection (ManagedTransportConnection.java:79) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.command.ConnectionInfo.visit (ConnectionInfo.java:139) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.broker.TransportConnection.service (TransportConnection.java:292) [ 84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.broker.TransportConnection $ 1.onCommand (TransportConnection.java:149) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.transport.MutexTransport.onCommand (MutexTransport.java:50) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.transport .WireFormatNegotiator.onCommand (WireFormatNegotiator.java:113) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand (AbstractInactivityMonitor.java:270) [84 : org.apache.activemq.activemq-osgi : 5.9.0] at org.apache.activemq.transport.TransportSupport.doConsume (TransportSupport.java:83) [84 : org.apache.activemq.activemq-osgi : 5.9. 0] at org.apache.activemq.transport.tcp.TcpTransport.doRun (TcpTransport.java:214) (84 : org.apache.activemq-osgi : 5.9.0) OSGI : java.lang.Thread.run (Thread.java:745)에서 5.9.0] [: 1.7.0_60]
로그는 올바르게 인쇄되고 있습니다. 내부 컨텍스트에서 잘 작동합니다. – Arpit