Your code is in the default package, i.e. you have source all files in src/main/java with no custom package. I strongly suggest u to create package n then place your source file in it.
Ex-
src->
main->
java->
com.myfirst.example
Example.java
com.myfirst.example.controller
PersonController.java
com.myfirst.example.repository
PersonRepository.java
com.myfirst.example.model
Person.java
I hope it will resolve your problem.