Create a Spring Boot project with the dependency 'spring-boot-starter-web' added in the pom.xml file.In the GreetingController class, a REST endpoint '/greet' is defined with two RequestParam annotations for 'name' and 'title'.The 'name' parameter is marked as required, while the 'title' parameter is optional with a default value of 'User'.When hitting the endpoint 'http://localhost:8080/greet?name=John&title=Mr', the output will be 'Hello Mr John!'.