Reputation: 3080
I got this error in the console: java.lang.IllegalArgumentException: Could not resolve placeholder 'T(org.springframework.integration.context.IntegrationContextUtils).getIntegrationProperties(beanFactory).getProperty('spring.integraton.channels.autoCreate')' in string value "${T(org.springframework.integration.context.IntegrationContextUtils).getIntegrationProperties(beanFactory).getProperty('spring.integraton.channels.autoCreate')}"
using spring integration 4.1.5.RELEASE
<int:channel id="mailChannel"/>
<int-mail:inbound-channel-adapter id="emailReceiverAdapter"
store-uri="imaps://username:[email protected]:993/inbox"
channel="receiveChannel"
auto-startup="true"
should-delete-messages="false"
should-mark-messages-as-read="false"
java-mail-properties="javaMailProperties"
max-fetch-size="1">
<int:poller max-messages-per-poll="1" fixed-rate="10000"/>
</int-mail:inbound-channel-adapter>
<bean id="mailReceiver" class="com.company.email.EmailReceiver"/>
<int:service-activator input-channel="receiveChannel" ref="mailReceiver" method="process"/>
<util:properties id="javaMailProperties">
<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
<prop key="mail.imap.socketFactory.fallback">false</prop>
<prop key="mail.store.protocol">imap</prop>
<prop key="mail.debug">false</prop>
</util:properties>
in the test everything runs ok, but when I start the app, I got error above.
Upvotes: 1
Views: 580
Reputation: 2186
Found this in the spring integration migration guide
Spring Integration starting with version 3.0 introduced global options, which can be changed using META-INF/integration.properties file or integrationGlobalProperties bean. Since version 4.0 those properties have been enriched with spring.integraton. prefix. Here is a list of all supported global options with their default values:
spring.integraton.channels.autoCreate=true spring.integraton.channels.maxUnicastSubscribers=0x7fffffff spring.integraton.channels.maxBroadcastSubscribers=0x7fffffff spring.integraton.taskScheduler.poolSize=10 spring.integraton.messagingTemplate.throwExceptionOnLateReply=false
So the kind of error that you're getting it seems like you'll have to create this property file and put it the appropriate location mentioned. You can check the link here One example is also given here
<context:property-placeholder
location="org/springframework/integration/config/xml/propertyplaceholder/channel.properties" />
Upvotes: 1