How to disable some methods of restfull api?
<p>There is some server running on Raspberry Pi2. It provides some RESTFull API.
RESTFull functionality is implemented by Spring. Other tech./tools: Java 8, Spring, Hibernate, gradle. There is need to customize application (to provide minimum functinality perhaps with some another implementation of several methods). In other words there is need to disable some of RESTFull methods. It would be the best not to have them in the final build (gradle is used).
@Profile (Spring) unfortunatelly might be applied for full class (not methods). It would be also beutifull to avoid any duplication of code. Applying Spring Security is also not the best variant.
So how to disable some RESTFull methods in such case? Custom annotation? </p>