<channel-adaptor name=‘my-channel' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
type="server"
logger="Q2"
realm="my-channel-setup"
parameter-factory="parameter-factory">
<property name="host" value="${server.host}"/>
<property name="port" value="${server.port}"/>
</channel>
<in>my-send</in>
<out>my-receive</out>
<ready>my-channel.ready</ready>
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>
application.yml
server:
host: localhost
port: 8080
You can do that out of the box if you place your YML file in cfg/default.yml
.
You can keep your existing cfg/application.yml
name if you use the -Eapplication
parameter when you call Q2.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/daabbb2b-267c-43d0-a20e-ec2341b521e5n%40googlegroups.com.
If you are trying to do this for a Spring Boot application, I see two options:
src/dist/cfg/default.yml
as a copy of your application.yaml
.
A symbolic link in the developer environment would also work,
or you can maintain the name and use the -Eapplication
option that Alejando mentions in the other response. server.host
and server.port
system properties from the content of the Spring properties
before starting Q2.Other options may
involve something like extracting the application.yaml
at runtime and place it in cfg
before starting Q2, I wouldn’t recommend this one. Personally, I
would go for something like 2, but it’s more of a question of
taste.
You could even define an Environment Provider to resolve environment properties from the Spring context, I believe this option could be a good one, but would require more experimentation and deeper jPOS knowledge.
Best regards.
Andrés Alcarraz