I can’t comment on the specifics of Nalu, but the behavior you’re seeing is related to SDM. When running the GWT SDM server, your Spring server relies on the SDM working directory (launcherDir, typically named accordingly) to serve resources. This directory is created when SDM starts.
If the Spring server is started before SDM, the directory will not yet exist, causing the server to fail. Likewise, if launcherDir is configured inside a build directory that gets cleaned between builds (for example, Maven’s target directory), running mvn clean will delete it. In that case, the issue will only appear after a clean build, which you can easily verify.
If you point launcherDir to a location that persists between builds (not generally recommended), the startup order would no longer matter. You can test this by configuring both the Spring server and the SDM launcherDir to use a persistent location and observing the behavior.