I have added the same code to my project, and the application has started successfully, as you can see in the picture below. You need to reload the Maven project properly, as shown in the screenshot below.
Below is my pom.xml