mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
ATS-738 / MNT-21613: Allow option to use -DACTIVEMQ_URL (without needing to also set -Dactivemq.url) (#266)
This commit is contained in:
parent
8cdbc00424
commit
8c7edcda62
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -49,8 +49,19 @@ public class MessagingInfo
|
|||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
final boolean jms = activemqUrl != null && !activemqUrl.trim().isEmpty();
|
// For backwards-compatibility, we continue to rely on setting ACTIVEMQ_URL environment variable (see application.yaml)
|
||||||
logger.info("JMS client is {}, activemq.url: '{}'", jms ? "ENABLED" : "DISABLED",
|
// The MessagingConfig class uses on ConditionalOnProperty (ie. activemq.url is set and not false)
|
||||||
activemqUrl);
|
|
||||||
|
// Note: as per application.yaml the broker url is appended with "?jms.watchTopicAdvisories=false". If this needs to be fully
|
||||||
|
// overridden then it would require explicitly setting both "spring.activemq.broker-url" *and* "activemq.url" (latter to non-false value).
|
||||||
|
|
||||||
|
if ((activemqUrl != null) && (! activemqUrl.equals("false")))
|
||||||
|
{
|
||||||
|
logger.info("JMS client is ENABLED - ACTIVEMQ_URL ='{}'", activemqUrl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.info("JMS client is DISABLED - ACTIVEMQ_URL is not set");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,9 @@ spring:
|
|||||||
jackson:
|
jackson:
|
||||||
default-property-inclusion: non_empty
|
default-property-inclusion: non_empty
|
||||||
|
|
||||||
|
activemq:
|
||||||
|
url: ${ACTIVEMQ_URL:false}
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8090
|
port: 8090
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user