diff --git a/2021-08/spring-30/pom.xml b/2021-08/spring-30/pom.xml
new file mode 100644
index 00000000..56dbc7bd
--- /dev/null
+++ b/2021-08/spring-30/pom.xml
@@ -0,0 +1,17 @@
+
+
+ 4.0.0
+
+ ru.otus
+ spring-30
+ 1.0
+
+ pom
+
+
+ spring-30-exercise
+ spring-30-solution
+
+
diff --git a/2021-08/spring-30/spring-30-exercise/pom.xml b/2021-08/spring-30/spring-30-exercise/pom.xml
new file mode 100644
index 00000000..905f3364
--- /dev/null
+++ b/2021-08/spring-30/spring-30-exercise/pom.xml
@@ -0,0 +1,57 @@
+
+
+ 4.0.0
+
+ ru.otus
+ spring-30-exercise
+ 1.0-SNAPSHOT
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.5.5
+
+
+
+
+ 2.8.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-rest
+
+
+ org.springframework.data
+ spring-data-rest-hal-explorer
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ com.h2database
+ h2
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
diff --git a/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/App.java b/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/App.java
new file mode 100644
index 00000000..36fd17f8
--- /dev/null
+++ b/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/App.java
@@ -0,0 +1,30 @@
+package ru.otus.spring.microservice;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.hateoas.config.EnableHypermediaSupport;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import ru.otus.spring.microservice.domain.Person;
+import ru.otus.spring.microservice.repostory.PersonRepository;
+
+import javax.annotation.PostConstruct;
+
+@SpringBootApplication
+public class App {
+
+ @Autowired
+ private PersonRepository repository;
+
+ public static void main(String[] args) {
+ SpringApplication.run(App.class);
+ }
+
+ @PostConstruct
+ public void init() {
+ for(int i = 0 ; i < 1000; ++i) {
+ repository.save(new Person("Ivan"));
+ repository.save(new Person("Maria"));
+ }
+ }
+}
diff --git a/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/domain/Person.java b/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/domain/Person.java
new file mode 100644
index 00000000..e3d66986
--- /dev/null
+++ b/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/domain/Person.java
@@ -0,0 +1,37 @@
+package ru.otus.spring.microservice.domain;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Person {
+
+ @Id
+ @GeneratedValue
+ private int id;
+ private String name;
+
+ public Person() {
+ }
+
+ public Person(String name) {
+ this.name = name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/repostory/PersonRepository.java b/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/repostory/PersonRepository.java
new file mode 100644
index 00000000..7a21a50d
--- /dev/null
+++ b/2021-08/spring-30/spring-30-exercise/src/main/java/ru/otus/spring/microservice/repostory/PersonRepository.java
@@ -0,0 +1,17 @@
+package ru.otus.spring.microservice.repostory;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+import org.springframework.data.rest.core.annotation.RestResource;
+import ru.otus.spring.microservice.domain.Person;
+
+import java.util.List;
+
+@RepositoryRestResource(path = "person")
+public interface PersonRepository extends JpaRepository {
+
+ List findAll();
+
+ @RestResource(path = "names")
+ List findByName(String name);
+}
diff --git a/2021-08/spring-30/spring-30-exercise/src/main/resources/application.yml b/2021-08/spring-30/spring-30-exercise/src/main/resources/application.yml
new file mode 100644
index 00000000..e69de29b
diff --git a/2021-08/spring-30/spring-30-solution/pom.xml b/2021-08/spring-30/spring-30-solution/pom.xml
new file mode 100644
index 00000000..2fe3e3e8
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/pom.xml
@@ -0,0 +1,61 @@
+
+
+ 4.0.0
+
+ ru.otus
+ spring-30-solution
+ 1.0-SNAPSHOT
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.5.5
+
+
+
+
+ 2.8.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-rest
+
+
+ org.springframework.data
+ spring-data-rest-hal-explorer
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ io.micrometer
+ micrometer-registry-prometheus
+
+
+ com.h2database
+ h2
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
diff --git a/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/App.java b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/App.java
new file mode 100644
index 00000000..36fd17f8
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/App.java
@@ -0,0 +1,30 @@
+package ru.otus.spring.microservice;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.hateoas.config.EnableHypermediaSupport;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import ru.otus.spring.microservice.domain.Person;
+import ru.otus.spring.microservice.repostory.PersonRepository;
+
+import javax.annotation.PostConstruct;
+
+@SpringBootApplication
+public class App {
+
+ @Autowired
+ private PersonRepository repository;
+
+ public static void main(String[] args) {
+ SpringApplication.run(App.class);
+ }
+
+ @PostConstruct
+ public void init() {
+ for(int i = 0 ; i < 1000; ++i) {
+ repository.save(new Person("Ivan"));
+ repository.save(new Person("Maria"));
+ }
+ }
+}
diff --git a/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/actuators/MyHealthIndicator.java b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/actuators/MyHealthIndicator.java
new file mode 100644
index 00000000..024e1357
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/actuators/MyHealthIndicator.java
@@ -0,0 +1,27 @@
+package ru.otus.spring.microservice.actuators;
+
+import org.springframework.boot.actuate.health.Health;
+import org.springframework.boot.actuate.health.HealthIndicator;
+import org.springframework.boot.actuate.health.Status;
+import org.springframework.stereotype.Component;
+
+import java.util.Random;
+
+@Component
+public class MyHealthIndicator implements HealthIndicator {
+
+ private final Random random = new Random();
+
+ @Override
+ public Health health() {
+ boolean serverIsDown = random.nextBoolean();
+ if (serverIsDown) {
+ return Health.down()
+ .status(Status.DOWN)
+ .withDetail("message", "Караул!")
+ .build();
+ } else {
+ return Health.up().withDetail("message", "Ура, товарищи!").build();
+ }
+ }
+}
diff --git a/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/domain/Person.java b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/domain/Person.java
new file mode 100644
index 00000000..e3d66986
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/domain/Person.java
@@ -0,0 +1,37 @@
+package ru.otus.spring.microservice.domain;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Person {
+
+ @Id
+ @GeneratedValue
+ private int id;
+ private String name;
+
+ public Person() {
+ }
+
+ public Person(String name) {
+ this.name = name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/repostory/PersonRepository.java b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/repostory/PersonRepository.java
new file mode 100644
index 00000000..7133d498
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/repostory/PersonRepository.java
@@ -0,0 +1,14 @@
+package ru.otus.spring.microservice.repostory;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+import ru.otus.spring.microservice.domain.Person;
+
+import java.util.List;
+
+// Эта аннотация позволяет изменить имя ресурса
+@RepositoryRestResource(path = "person")
+public interface PersonRepository extends JpaRepository {
+
+ List findByName(String name);
+}
diff --git a/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/rest/MetricsCounter.java b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/rest/MetricsCounter.java
new file mode 100644
index 00000000..ff9a4ffc
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/src/main/java/ru/otus/spring/microservice/rest/MetricsCounter.java
@@ -0,0 +1,25 @@
+package ru.otus.spring.microservice.rest;
+
+import io.micrometer.core.instrument.MeterRegistry;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class MetricsCounter {
+
+ private final MeterRegistry registry;
+
+ public MetricsCounter(MeterRegistry registry) {
+ this.registry = registry;
+ }
+
+ @GetMapping("/counter")
+ public void counter() {
+ registry.counter("counter.example").increment();
+ }
+
+ @GetMapping("/gauge")
+ public void gauge() {
+ registry.gauge("gauge.example", Math.random());
+ }
+}
diff --git a/2021-08/spring-30/spring-30-solution/src/main/resources/application.yml b/2021-08/spring-30/spring-30-solution/src/main/resources/application.yml
new file mode 100644
index 00000000..7cdb336f
--- /dev/null
+++ b/2021-08/spring-30/spring-30-solution/src/main/resources/application.yml
@@ -0,0 +1,23 @@
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "*"
+ endpoint:
+ health:
+ show-details: always
+ health:
+ defaults:
+ enabled: true
+ info:
+ git:
+ mode: full
+ cors:
+ allowed-origins: http://localhost:9090/
+ allowed-methods: GET,POST,OPTIONS
+
+info:
+ version: @project.version@
+ author: dkogan
+ descriptiion: THis is SPring Bot example
+