How can springMVC support the invocation of both front-end and other services when building Rest API services?

problem description

at present, the Rest API, built with SpringMVC in the project not only wants to be called by front-end Ajax, but also wants to be provided to a third party through HTTPClient. At the same time, third parties need to support security authentication such as digest. Is there any better solution?

the environmental background of the problems and what methods you have tried

1. At present, I am thinking of developing another layer of API to a third party to support the summary through security

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

May.29,2021

whether it is an Ajax call or HttpClient, it is a get or post request that is used. There is no conflict between the two.
as for authentication such as permissions, Ajax has a global setting method regardless of whether it uses Jquery or axios, which can be searched on its own.
you can set unified request parameters such as token globally.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b9b5-2c2c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b9b5-2c2c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?