When using the spring initializer, make sure you use the latest version of Spring Boot. It automatically gets Spring core 5.1 or greater for you and you won't see the error when you run the project.
So you don't have to worry about editing any JVM configuration.