Jesper de Jong wrote:What do you mean with "does not work at all"? What exactly did you try and what problems exactly did you have with it? Any error messages?
You can execute whatever you want in the main() method before you call SpringApplication.run(), there's no special reason why this wouldn't work.
That is what I thought as well.
I have logging statements before and after the static method I'm calling (to start the TCP/IP server). But the logging isn't logging those strings and, similarly, the logging statements in the static method aren't being logged either.
Dave Tolls wrote:Has the logging system started up at that point?
Isn't that one of the things Spring Boot loads up?
Yeah, I thought of that too.
But, in any case, the TCP/IP server isn't getting started from the static call in main() so I guess I'll create a standalone executable JAR and auto-start that at the OS level. That approach may be better since as the application grows, they might not always want to start that TCP/IP server.