Re: Upload file to alfresco using java spring boot
I suspect the replies propose using CMIS because it is easier in this case. You are already in Java. OpenCMIS gives you a nice library to work with Java objects. Why go to the trouble of using the REST API? Plus, the OP wants to create documents, which is right in the CMIS wheelhouse.
Either way you choose it doesn't matter--the nice thing is that developer's have options. Use what comes natural for you and the project.