How-To Pass a Device Name to AS/400
Sometimes we need to use a single device name when integrating into the client's environment
Step-by-Step Guide
Open the {SdkProject}AutoConfiguration.java File
Add this code snippet:
@Bean public DeviceAllocator deviceAllocator() { return ((pullName, newSessionProperties) -> "new-device-name"); }
It should look like this
@Configuration @Import(value = {{SdkProject}Configuration.class}) public class {SdkProject}AutoConfiguration { @Bean public DeviceAllocator deviceAllocator() { return ((pullName, newSessionProperties) -> "set-device-name-here"); } }
{SdkProject} - is a placeholder for your SDK project name