I've been inspired to fix our build times after watching:
I'll be updating this as I investigate different techniques this week.
Here are a list of improvements and the effect they had on build times.
This made the build twice as slow.. and broke the swagger tests as some of the endpoints didn't get instantiated.
Reduce all logging to only log on WARN
The more profiles you have in tests, the more the spring DI ApplicationContext cache has to be reset. This can have a massive speed impact on your tests.
This one requires considering that integration tests or "SpringBootTests" are really just testing that spring is configured correctly.
Most of the logic should be in fast unit tests.
Have maybe a single integration test