There is a [spotless plugin](https://github.com/diffplug/spotless/tree/main/plugin-maven) that could be added to the project to check and apply formatting