I know this is pretty late answer. But it might still help some new learners. The Following example is only for springboot with NETBEANS. I had to do the following steps:
Step 1. Follow @Mariuszs answer .
Step 2. Right click on project -> Properties -> RUN. Make sure the Main Class field is has the correct starter class else Click browse and select from the available classes .
Step 3. Click OK-> OK. Thant is all. Thank you.