This question is mostly asked by experienced Java programmers with about 2 to 5 years of experience with both REST and Spring. Security is a broad term; it could mean the security of a message, which is provided by encryption or access restriction that is provided using authentication and authorization.
REST is normally not secure, but you can secure it by using Spring Security. At the very least, you can enable the HTTP basic authentication by using HTTP in your Spring Security configuration file. Similarly, you can expose your REST API using HTTPS, if the underlying server supports HTTPS.