Spring Boot, Development, Monitoring Tools, Java, Programming.
configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/actuator/top-products").hasRole("ADMIN") .anyRequest().authenticated() .and().httpBasic(); } } In this example, only users with the ADMIN role can access the custom endpoint. 4. Cons and Pros While custom