Skip to content

Tag: swagger

How to configure HTTP Basic authentication for Swagger 2 and Spring 2

This post will explain how to configure Spring Boot 2 to access Swagger 2 using HTTP Basic authorization. Requirements Spring Boot 2.0.4.RELEASE Swagger 2.9.2 Create¬†the REST controller import com.server.common.model.Menu; import com.server.dataservice.service.MenuService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController(“menus”) public…

Continue reading How to configure HTTP Basic authentication for Swagger 2 and Spring 2