From c36bedd679210ff2bcfc2add3835de89e57924ef Mon Sep 17 00:00:00 2001 From: Petros Stergioulas Date: Mon, 25 May 2020 19:01:49 +0200 Subject: [PATCH] Remove actuator --- spring-boot/spring-boot-codefirst/build.gradle | 1 - .../codefirst/CodeFirstApplication.java | 18 ------------------ .../src/main/resources/application.yml | 6 ------ 3 files changed, 25 deletions(-) diff --git a/spring-boot/spring-boot-codefirst/build.gradle b/spring-boot/spring-boot-codefirst/build.gradle index eb1ab2b..018cb68 100644 --- a/spring-boot/spring-boot-codefirst/build.gradle +++ b/spring-boot/spring-boot-codefirst/build.gradle @@ -19,7 +19,6 @@ repositories { } dependencies { - implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springdoc:springdoc-openapi-ui:1.3.3' diff --git a/spring-boot/spring-boot-codefirst/src/main/java/io/reflectoring/codefirst/CodeFirstApplication.java b/spring-boot/spring-boot-codefirst/src/main/java/io/reflectoring/codefirst/CodeFirstApplication.java index e756732..389bfc7 100644 --- a/spring-boot/spring-boot-codefirst/src/main/java/io/reflectoring/codefirst/CodeFirstApplication.java +++ b/spring-boot/spring-boot-codefirst/src/main/java/io/reflectoring/codefirst/CodeFirstApplication.java @@ -65,15 +65,6 @@ interface TodoApi { void delete(@PathVariable String id); } -@RequestMapping("/unsecured") -@Tag(name = "Unsecured API", description = "aliquet nec ullamcorper sit amet risus nullam eget felis eget") -interface UnsecuredApi { - - @GetMapping - @ResponseStatus(code = HttpStatus.OK) - String unsecured(); -} - @OpenAPIDefinition( info = @Info( title = "Code-First Approach (reflectoring.io)", @@ -166,13 +157,4 @@ class TodoController implements TodoApi { .map(todo -> new Todo(UUID.randomUUID().toString(), todo)) .collect(Collectors.toList()); } -} - -@RestController -class Unsecured implements UnsecuredApi { - - @Override - public String unsecured() { - return "unsecured"; - } } \ No newline at end of file diff --git a/spring-boot/spring-boot-codefirst/src/main/resources/application.yml b/spring-boot/spring-boot-codefirst/src/main/resources/application.yml index 66e4bba..3726e11 100644 --- a/spring-boot/spring-boot-codefirst/src/main/resources/application.yml +++ b/spring-boot/spring-boot-codefirst/src/main/resources/application.yml @@ -1,9 +1,3 @@ springdoc: api-docs: path: /reflectoring-openapi - show-actuator: true -management: - endpoints: - web: - exposure: - include: "*"