Converting a REST API to https I wont recommend , instead you can make your domain secure using https . But if you still want to do it using spring boot its pretty simple and easy stps.
1. Generate a Self Signed Certificate .Jks file
2. Put it in your class path
then update the following configuration .
Have a look at the source code down below with details .
https://frugalisminds.com/how-to-configure-ssl-in-spring-boot-2/