{"id":79987,"date":"2020-05-02T01:42:42","date_gmt":"2020-05-01T23:42:42","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring"},"modified":"2020-05-02T01:42:42","modified_gmt":"2020-05-01T23:42:42","slug":"kak-quarkus-obedinyaet-microprofile-i-spring","status":"publish","type":"post","link":"https:\/\/prohoster.info\/cs\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring","title":{"rendered":"Jak Quarkus spojuje MicroProfile a Spring","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Ahoj v\u0161em, a zde je t\u0159et\u00ed p\u0159\u00edsp\u011bvek ze s\u00e9rie o Quarkusu!<\/p>\n<p><img decoding=\"async\" alt=\"Jak Quarkus spojuje MicroProfile a Spring\" src=\"\/wp-content\/uploads\/2020\/05\/d98ff470b49f8de1fa488a6818160969.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nP\u0159i v\u00fdvoji Java mikroslu\u017eeb je \u010dasto pova\u017eov\u00e1no za samoz\u0159ejm\u00e9, \u017ee <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/blog\/2019\/02\/28\/jumpstart-microservices-microprofile-starter-beta\/\">Eclipse MicroProfile<\/a><\/noindex> a <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/topics\/spring-boot\/\">Spring Boot<\/a><\/noindex> je sb\u00edrka odd\u011blen\u00fdch a na sob\u011b nez\u00e1visl\u00fdch API. V\u00fdvoj\u00e1\u0159i obvykle pou\u017e\u00edvaj\u00ed ty API, na kter\u00fdch jsou zvykl\u00ed, proto\u017ee osvojen\u00ed nov\u00fdch r\u00e1mc\u016f a runtime komponent\u016f vy\u017eaduje hodn\u011b \u010dasu. Dnes se pokus\u00edme zjednodu\u0161it osvojen\u00ed n\u011bkter\u00fdch popul\u00e1rn\u00edch <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/blog\/2018\/11\/21\/eclipse-microprofile-for-spring-boot-developers\/\">MicroProfile API pro Spring v\u00fdvoj\u00e1\u0159e<\/a><\/noindex> a uk\u00e1\u017eeme, jak sou\u010dasn\u011b vyu\u017e\u00edt Spring API a nov\u00e9 u\u017eite\u010dn\u00e9 funkce <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/\">Quarkus<\/a><\/noindex>.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nP\u0159esn\u011bji \u0159e\u010deno, nejprve si uk\u00e1\u017eeme, jak\u00fd je z\u00e1b\u011br a detaily, jak Quarkus podporuje Spring API, abychom uk\u00e1zali Spring v\u00fdvoj\u00e1\u0159\u016fm, jak lze vyu\u017e\u00edt MicroProfile API v jejich ka\u017edodenn\u00ed pr\u00e1ci. Pot\u00e9 se zam\u011b\u0159\u00edme na MicroProfile API, kter\u00e9 budou pro Spring v\u00fdvoj\u00e1\u0159e u\u017eite\u010dn\u00e9 p\u0159i vytv\u00e1\u0159en\u00ed mikroslu\u017eeb.<\/p>\n<p>Pro\u010d zrovna Quarkus? Za prv\u00e9, je tu live coding, tedy automatick\u00e9 op\u011btovn\u00e9 na\u010d\u00edt\u00e1n\u00ed jak\u00fdchkoli zm\u011bn v MicroProfile API, Spring API a dal\u0161\u00edch Java API, kter\u00e9 se prov\u00e1d\u00ed jedn\u00edm p\u0159\u00edkazem: mvn quarkus:dev. Za druh\u00e9, p\u0159\u00edkladem v <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">na\u0161em p\u0159\u00edpad\u011b<\/a><\/noindex> slu\u017eba Person (ta se sestavuje z API rozhran\u00ed Spring, MicroProfile a JPA do bin\u00e1rn\u00edho souboru pomoc\u00ed nativn\u00edho obrazu GraalVM) se spust\u00ed za pouh\u00fdch 0,055 sekundy a zabere p\u0159ibli\u017en\u011b 90 MB v opera\u010dn\u00ed pam\u011bti (RSS) na koncov\u00e9m bod\u011b aplikace RESTful. P\u0159i\u010dem\u017e samotn\u00e1 jej\u00ed kompilace prob\u00edh\u00e1 jedn\u00edm p\u0159\u00edkazem: mvn package -Pnative.<\/p>\n<p>Nechceme j\u00edt p\u0159\u00edli\u0161 do hloubky ohledn\u011b MicroProfile, ale pokus\u00edme se pomoci Spring v\u00fdvoj\u00e1\u0159\u016fm pochopit, jak lze v Quarkusu vyu\u017e\u00edt Spring API spolu s MicroProfile API.<\/p>\n<h3>Kontejnery a Kubernetes<\/h3>\n<p>\nAbychom tuto p\u0159\u00edru\u010dku nezaplnili p\u0159\u00edli\u0161 podrobnostmi, zam\u011b\u0159\u00edme se zde pouze na vysoce \u00farov\u0148ov\u00e9 aspekty podpory <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/developer-tools\/kubernetes\">Kubernetes<\/a><\/noindex>, co\u017e je d\u016fle\u017eit\u00e9 si uv\u011bdomit. Quarkus je prezentov\u00e1n jako Java stack pro Kubernetes, kter\u00fd m\u00e1 za c\u00edl minimalizovat spot\u0159ebu pam\u011bti a dobu spu\u0161t\u011bn\u00ed Java aplikac\u00ed a slu\u017eeb, a t\u00edm zv\u00fd\u0161it jejich um\u00edst\u011bn\u00ed na hostiteli a sn\u00ed\u017eit celkov\u00e9 n\u00e1klady.<\/p>\n<p>Quarkus tak\u00e9 <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/kubernetes-resources\">podporuje automatick\u00e9 generov\u00e1n\u00ed<\/a><\/noindex> zdroj\u016f Kubernetes a nab\u00edz\u00ed <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/\">n\u00e1vody<\/a><\/noindex> pro nasazen\u00ed na platform\u00e1ch Kubernetes a Red Hat OpenShift. Krom\u011b toho Quarkus automaticky generuje soubory Dockerfile.jvm (JVM balen\u00ed) a Dockerfile.native (nativn\u00ed bin\u00e1rn\u00ed balen\u00ed), kter\u00e9 jsou pot\u0159ebn\u00e9 pro vytv\u00e1\u0159en\u00ed kontejner\u016f.<\/p>\n<p>A nakonec, zam\u011b\u0159uj\u00edc se na Kubernetes jako na c\u00edlov\u00e9 prost\u0159ed\u00ed nasazen\u00ed, Quarkus nepou\u017e\u00edv\u00e1 Java frameworky tam, kde je podobn\u00e1 funk\u010dnost implementov\u00e1na na \u00farovni samotn\u00e9 platformy Kubernetes. V tabulce 1 je uvedena mapa funk\u010dn\u00ed shody Kubernetes a typick\u00fdch Java framework\u016f pou\u017e\u00edvan\u00fdch v\u00fdvoj\u00e1\u0159i Spring.<\/p>\n<p><i>Tabulka 1. Mapa funk\u010dn\u00ed shody Java framework\u016f a Kubernetes.<\/i><\/p>\n<p>Funk\u010dnost<br \/>\nTradi\u010dn\u00ed Spring Boot<br \/>\nKubernetes<\/p>\n<p>Objevov\u00e1n\u00ed slu\u017eeb<br \/>\nEureka<br \/>\n. Vytvo\u0159te A-z\u00e1znam blog a ur\u010dete pro n\u011bj n\u011bjakou fiktivn\u00ed IP (to je ofici\u00e1ln\u00ed<\/p>\n<p>Konfigurace<br \/>\nSpring Cloud Config<br \/>\nConfig Maps \/ Secrets<\/p>\n<p>Z\u00e1t\u011b\u017eov\u00e9 vyva\u017eov\u00e1n\u00ed<br \/>\nRibbon (na stran\u011b klienta)<br \/>\nSlu\u017eba, Replication Controller (na stran\u011b serveru)<\/p>\n<p><\/p>\n<h3>Kompilace a spu\u0161t\u011bn\u00ed k\u00f3du z p\u0159\u00edkladu<\/h3>\n<p>\nV tomto \u010dl\u00e1nku odkazujeme na <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">p\u0159\u00edklad projektu<\/a><\/noindex>, kde jsou spole\u010dn\u011b pou\u017e\u00edv\u00e1ny API rozhran\u00ed Spring a MicroProfile a dokonce i ten sam\u00fd Java t\u0159\u00edda. K\u00f3d z tohoto p\u0159\u00edkladu lze zkompilovat a spustit z p\u0159\u00edkazov\u00e9ho \u0159\u00e1dku, podrobnosti viz soubor README.md.<\/p>\n<h3>API rozhran\u00ed Spring Framework<\/h3>\n<p><\/p>\n<h4>Z\u00e1vislostn\u00ed injekce<\/h4>\n<p>\nQuarkus podporuje \u0159adu <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/cdi-reference\">API rozhran\u00ed Contexts and Dependency Injection (CDI)<\/a><\/noindex> a API rozhran\u00ed Spring Dependency Injection (Spring DI). Pokud pracujete s MicroProfile, <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/blog\/2019\/09\/12\/jakarta-ee-8-the-new-era-of-java-ee-explained\/\">Java EE a Jakarta EE<\/a><\/noindex>, u\u017e jste dob\u0159e obezn\u00e1meni s CDI. Na druhou stranu, v\u00fdvoj\u00e1\u0159i Spring mohou pou\u017e\u00edt Quarkus Extension pro Spring DI API, aby zajistili kompatibilitu se Spring DI. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch Spring DI API jsou uvedeny v tabulce 2.<\/p>\n<p>V <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projektu z na\u0161eho p\u0159\u00edkladu<\/a><\/noindex> se pou\u017e\u00edv\u00e1 jak CDI, tak Spring Dependency Injection. Dal\u0161\u00ed informace a p\u0159\u00edklady na toto t\u00e9ma lze nal\u00e9zt v pr\u016fvodci Quarkus, kter\u00fd se naz\u00fdv\u00e1 <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/spring-di\">Spring DI Guide<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 2. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API rozhran\u00ed Spring DI.<\/i><\/p>\n<p>Podporovan\u00e9 funkce Spring DI<br \/>\nP\u0159\u00edklady<\/p>\n<p>Injekce konstruktoru<\/p>\n<pre><code class=\"plaintext\">public PersonSpringController(\n   PersonSpringRepository personRepository,  \/\/ injektov\u00e1no      \n   PersonSpringMPService personService) {    \/\/ injektov\u00e1no\n      this.personRepository = personRepository;\n      this.personService = personService;\n}\n<\/code><\/pre>\n<p>Injekce pole<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/autowired\/\" class=\"user_link\">Autowired<\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/value\/\" class=\"user_link\">Hodnota<\/a><\/noindex><\/p>\n<pre><code class=\"plaintext\">@Autowired\n@RestClient\nSalutationRestClient salutationRestClient;\n\n@Value(\"${fallbackSalutation}\")\nString fallbackSalutation;\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/bean\/\" class=\"user_link\">Bean<\/a><\/noindex><br \/>\n@Configuration<\/p>\n<pre><code class=\"plaintext\">@Configuration\npublic class AppConfiguration {\n   @Bean(name = \"capitalizeFunction\")\n   public StringFunction capitalizer() {\n      return String::toUpperCase;\n   }\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/component\/\" class=\"user_link\">Komponenta<\/a><\/noindex><\/p>\n<pre><code class=\"plaintext\">@Component(\"noopFunction\")\npublic class NoOpSingleStringFunction implements StringFunction {\n   @Override\n   public String apply(String s) {\n      return s;\n   }\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/service\/\" class=\"user_link\">Slu\u017eba<\/a><\/noindex><\/p>\n<pre><code class=\"plaintext\">@Service\npublic class MessageProducer {\n   @Value(\"${greeting.message}\")\n   String message;\n\n   public String getPrefix() {\n      return message;\n   }\n}\n<\/code><\/pre>\n<p><\/p>\n<h4>Webov\u00fd framework<\/h4>\n<p>\nU\u017eivatel\u00e9 MicroProfile ocen\u00ed, \u017ee Quarkus podporuje JAX-RS, MicroProfile Rest Client, JSON-P a JSON-B jako hlavn\u00ed model webov\u00e9ho programov\u00e1n\u00ed. V\u00fdvoj\u00e1\u0159e Spring pot\u011b\u0161\u00ed ned\u00e1vno p\u0159idan\u00e1 podpora Spring Web API, zejm\u00e9na pro rozhran\u00ed odpov\u00eddaj\u00edc\u00ed REST. Podobn\u011b jako u Spring DI je hlavn\u00edm c\u00edlem podpory Spring Web API umo\u017enit v\u00fdvoj\u00e1\u0159\u016fm Spring vyu\u017e\u00edvat API rozhran\u00ed Spring Web spolu s API rozhran\u00edmi MicroProfile. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch Spring Web API jsou uvedeny v tabulce 3 a dal\u0161\u00ed informace a p\u0159\u00edklady na toto t\u00e9ma naleznete v p\u0159\u00edru\u010dce Quarkus s n\u00e1zvem <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/spring-web\">P\u0159\u00edru\u010dka Spring Web<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 3. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API rozhran\u00ed Spring Web.<\/i><\/p>\n<p>Podporovan\u00e9 funkce Spring Web<br \/>\nP\u0159\u00edklady<\/p>\n<p>@RestController<br \/>\n@RequestMapping<\/p>\n<pre><code class=\"plaintext\">@RestController\n@RequestMapping(\"\/person\")\npublic class PersonSpringController {\n   ...\n   ...\n   ...\n}\n<\/code><\/pre>\n<p>@GetMapping<br \/>\n@PostMapping<br \/>\n@PutMapping<br \/>\n@DeleteMapping<br \/>\n@PatchMapping<br \/>\n@RequestParam<br \/>\n@RequestHeader<br \/>\n@MatrixVariable<br \/>\n@PathVariable<br \/>\n@CookieValue<br \/>\n@RequestBody<br \/>\n@ResponseStatus<br \/>\n@ExceptionHandler<br \/>\n@RestControllerAdvice (\u010d\u00e1ste\u010dn\u011b)<\/p>\n<pre><code class=\"plaintext\">@GetMapping(path = \"\/greet\/{id}\",\n   produces = \"text\/plain\")\n   public String greetPerson(\n   @PathVariable(name = \"id\") long id) {\n   ...\n   ...\n   ...\n}\n<\/code><\/pre>\n<p><\/p>\n<h4>Spring Data JPA<\/h4>\n<p>\nU\u017eivatel\u00e9 MicroProfile tak\u00e9 ocen\u00ed, \u017ee Quarkus podporuje JPA pomoc\u00ed Hibernate ORM. Pro v\u00fdvoj\u00e1\u0159e Spring je tak\u00e9 skv\u011bl\u00e1 zpr\u00e1va, \u017ee Quarkus podporuje b\u011b\u017en\u011b pou\u017e\u00edvan\u00e9 anotace a typy Spring Data JPA. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API rozhran\u00ed Spring Data JPA jsou uvedeny v tabulce 4.<br \/>\nV <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projektu z na\u0161eho p\u0159\u00edkladu<\/a><\/noindex> pou\u017e\u00edvaj\u00ed API rozhran\u00ed Spring Data JPA, a dal\u0161\u00ed informace jsou dostupn\u00e9 v p\u0159\u00edru\u010dce Quarkus s n\u00e1zvem <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/spring-data-jpa-guide\">P\u0159\u00edru\u010dka Spring Data JPA<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 4. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API rozhran\u00ed Spring Data JPA.<\/i><\/p>\n<p>Podporovan\u00e9 funkce Spring Data JPA<br \/>\nP\u0159\u00edklady<\/p>\n<p>CrudRepository<\/p>\n<pre><code class=\"plaintext\">public interface PersonRepository\n         extends JpaRepository,\n                 PersonFragment {\n   ...\n}\n<\/code><\/pre>\n<p>Repository<br \/>\nJpaRepository<br \/>\nPagingAndSortingRepository<\/p>\n<pre><code class=\"plaintext\">public class PersonRepository extends \n\n    Repository {\n\n    Person save(Person entity);\n\n    Optional findById(Person entity);\n}\n<\/code><\/pre>\n<p>Fragmenty repository<\/p>\n<pre><code class=\"plaintext\">public interface PersonRepository\n         extends JpaRepository,\n                 PersonFragment {\n   ...\n}\n<\/code><\/pre>\n<p>Odvozen\u00e9 metody dotazov\u00e1n\u00ed<\/p>\n<pre><code class=\"plaintext\">public interface PersonRepository extends CrudRepository {\n\n    List findByName(String name);\n    \n    Person findByNameBySsn(String ssn);\n    \n    Optional \n       findByNameBySsnIgnoreCase(String ssn);\n\n    Boolean existsBookByYearOfBirthBetween(\n            Integer start, Integer end);\n}\n<\/code><\/pre>\n<p>U\u017eivatelsky definovan\u00e9 dotazy<\/p>\n<pre><code class=\"plaintext\">public interface MovieRepository\n         extends CrudRepository {\n\n    Movie findFirstByOrderByDurationDesc();\n\n    @Query(\"select m from Movie m where m.rating = ?1\")\n    Iterator findByRating(String rating);\n\n    @Query(\"from Movie where title = ?1\")\n    Movie findByTitle(String title);\n}\n<\/code><\/pre>\n<p><\/p>\n<h3>API rozhran\u00ed MicroProfile<\/h3>\n<p><\/p>\n<h4>Odolnost proti chyb\u00e1m<\/h4>\n<p>\nKonstruce tolerance k chyb\u00e1m jsou velmi d\u016fle\u017eit\u00e9 pro prevenci kask\u00e1dov\u00fdch selh\u00e1n\u00ed a pro vytv\u00e1\u0159en\u00ed spolehliv\u00fdch mikroslu\u017eebn\u00edch architektur. V\u00fdvoj\u00e1\u0159i Spring u\u017e mnoho let pou\u017e\u00edvaj\u00ed pro zaji\u0161t\u011bn\u00ed spolehlivosti circuit-breakery. <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Netflix\/Hystrix\">Hystrix<\/a><\/noindex>. Nicm\u00e9n\u011b Hystrix nebyl dlouho aktualizov\u00e1n, zat\u00edmco Fault Tolerance z MicroProfile se v sou\u010dasnosti aktivn\u011b vyv\u00edj\u00ed a m\u00e1 za sebou u\u017e n\u011bkolik let produk\u010dn\u00edho pou\u017e\u00edv\u00e1n\u00ed. Proto se doporu\u010duje pro zv\u00fd\u0161en\u00ed spolehlivosti slu\u017eeb v Quarkusu pou\u017e\u00edvat API rozhran\u00ed MicroProfile Fault Tolerance, p\u0159\u00edklady pou\u017eit\u00ed jsou uvedeny v tabulce 5. Dal\u0161\u00ed informace o tom lze nal\u00e9zt v pr\u016fvodci Quarkus. <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/microprofile-fault-tolerance\">Pr\u016fvodce toleranc\u00ed k chyb\u00e1m<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 5. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API rozhran\u00ed MicroProfile Fault Tolerance.<\/i><\/p>\n<p>Funkce MicroProfile Fault Tolerance<br \/>\nPopis<br \/>\nP\u0159\u00edklady<\/p>\n<p>@Asynchronous<\/p>\n<p>Prov\u00e1d\u011bn\u00ed logiky v samostatn\u00e9m vl\u00e1kna.<\/p>\n<pre><code class=\"plaintext\">@Asynchronous\n@Retry\npublic Future getSalutation() {\n   ...\n   return future;\n}\n<\/code><\/pre>\n<p>@Bulkhead<\/p>\n<p>Omezen\u00ed po\u010dtu sou\u010dasn\u00fdch po\u017eadavk\u016f.<\/p>\n<pre><code class=\"plaintext\">@Bulkhead(5)\npublic void fiveConcurrent() {\n   makeRemoteCall(); \/\/...\n}\n<\/code><\/pre>\n<p>@CircuitBreaker<\/p>\n<p>Inteligentn\u00ed zpracov\u00e1n\u00ed selh\u00e1n\u00ed a obnoven\u00ed po selh\u00e1n\u00ed.<\/p>\n<pre><code class=\"plaintext\">@CircuitBreaker(delay=500   \/\/ milliseconds\n   failureRatio = .75,\n   requestVolumeThreshold = 20,\n   successThreshold = 5)\n@Fallback(fallbackMethod = \"fallback\")\npublic String getSalutation() {\n   makeRemoteCall(); \/\/...\n}\n<\/code><\/pre>\n<p>@Fallback<\/p>\n<p>Vol\u00e1n\u00ed alternativn\u00ed logiky v p\u0159\u00edpad\u011b selh\u00e1n\u00ed.<\/p>\n<pre><code class=\"plaintext\">@Timeout(500) \/\/ milliseconds\n@Fallback(fallbackMethod = \"fallback\")\npublic String getSalutation() {\n   makeRemoteCall(); \/\/...\n}\n\npublic String fallback() {\n   return \"hello\";\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/retry\/\" class=\"user_link\">Retry<\/a><\/noindex><\/p>\n<p>Opakov\u00e1n\u00ed p\u0159i selh\u00e1n\u00ed po\u017eadavku.<\/p>\n<pre><code class=\"plaintext\">@Retry(maxRetries=3)\npublic String getSalutation() {\n   makeRemoteCall(); \/\/...\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/timeout\/\" class=\"user_link\">Timeout<\/a><\/noindex><\/p>\n<p>Kontroln\u00ed doba \u010dek\u00e1n\u00ed p\u0159i selh\u00e1n\u00ed.<\/p>\n<pre><code class=\"plaintext\">@Timeout(value = 500 )   \/\/ milliseconds\n@Fallback(fallbackMethod = \"fallback\")\npublic String getSalutation() {\n   makeRemoteCall(); \/\/...\n}\n<\/code><\/pre>\n<p><\/p>\n<h4>Kontrola slu\u017eeb (Service Health)<\/h4>\n<p>\nPlatformy Kubernetes sleduj\u00ed stav kontejner\u016f pomoc\u00ed speci\u00e1ln\u00edch slu\u017eeb. Aby podkladov\u00e1 platforma mohla monitorovat slu\u017eby, v\u00fdvoj\u00e1\u0159i Spring obvykle pou\u017e\u00edvaj\u00ed konfigurovateln\u00e9 HealthIndicator a Spring Boot Actuator. V Quarkusu to lze ud\u011blat pomoc\u00ed MicroProfile Health, kter\u00e9 ve v\u00fdchoz\u00edm nastaven\u00ed prov\u00e1d\u011bj\u00ed kontrolu funk\u010dnosti (liveness check), ale mohou b\u00fdt tak\u00e9 nastaveny na sou\u010dasnou kontrolu liveness a readiness (p\u0159ipravenosti). P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API MicroProfile Health jsou uvedeny v tabulce 6, a dal\u0161\u00ed informace najdete v pr\u016fvodci Quarkus. <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/microprofile-health\">Pr\u016fvodce zdrav\u00edm<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 6. P\u0159\u00edklady pou\u017eit\u00ed podporovan\u00fdch API rozhran\u00ed MicroProfile Health.<\/i><\/p>\n<p>Funkce MicroProfile Health<br \/>\nPopis<br \/>\nP\u0159\u00edklady<\/p>\n<p>@Liveness<\/p>\n<p>Platforma prov\u00e1d\u00ed restart nefunk\u010dn\u00edch kontejnerizovan\u00fdch aplikac\u00ed.<br \/>\nEndpoint:<br \/>\nhost:8080\/health\/live<\/p>\n<pre><code class=\"plaintext\">@Liveness\npublic class MyHC implements HealthCheck {\n  public HealthCheckResponse call() {\n\n   ...\n   return HealthCheckResponse\n     .named(\"myHCProbe\")\n     .status(ready ? true:false)\n     .withData(\"mydata\", data)\n     .build();  \n}\n<\/code><\/pre>\n<p>@Readiness<\/p>\n<p>Platforma nebude pos\u00edlat provoz do kontejnerizovan\u00fdch aplikac\u00ed, pokud nejsou p\u0159ipraven\u00e9.<br \/>\nEndpoint:<br \/>\nhost:8080\/health\/ready<\/p>\n<pre><code class=\"plaintext\">@Readiness\npublic class MyHC implements HealthCheck {\n  public HealthCheckResponse call() {\n\n   ...\n   return HealthCheckResponse\n     .named(\"myHCProbe\")\n     .status(live ? true:false)\n     .withData(\"mydata\", data)\n     .build();  \n}\n<\/code><\/pre>\n<p><\/p>\n<h4>Metriky<\/h4>\n<p>\nAplikace poskytuj\u00ed metriky bu\u010f pro provozn\u00ed \u00fa\u010dely (sledov\u00e1n\u00ed v\u00fdkonnostn\u00edch SLA), nebo pro neprovozn\u00ed (podnikov\u00e9 SLA). V\u00fdvoj\u00e1\u0159i Spring poskytuj\u00ed metriky pomoc\u00ed Spring Boot Actuator a Micrometer. Na druh\u00e9 stran\u011b Quarkus pou\u017e\u00edv\u00e1 MicroProfile Metrics k zaji\u0161t\u011bn\u00ed z\u00e1kladn\u00edch metrik (JVM a opera\u010dn\u00ed syst\u00e9m), metriky dodavatele (Quarkus) a metriky aplikac\u00ed. MicroProfile Metrics vy\u017eaduje, aby implementace podporovala v\u00fdstupn\u00ed form\u00e1ty JSON a OpenMetrics (Prometheus). P\u0159\u00edklady pou\u017eit\u00ed API MicroProfile Metrics jsou uvedeny v tabulce 7.<\/p>\n<p>V <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projektu z na\u0161eho p\u0159\u00edkladu<\/a><\/noindex> MicroProfile Metrics se pou\u017e\u00edvaj\u00ed k poskytov\u00e1n\u00ed metrik aplikace. Dal\u0161\u00ed informace najdete v p\u0159\u00edru\u010dce Quarkus. <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/microprofile-metrics\">P\u0159\u00edru\u010dka k metrik\u00e1m<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 7. P\u0159\u00edklady pou\u017eit\u00ed API MicroProfile Metrics.<\/i><\/p>\n<p>Funkce MicroProfile Metrics<br \/>\nPopis<br \/>\nP\u0159\u00edklady<\/p>\n<p>@Counted<\/p>\n<p>Oz ozna\u010duje counter, kter\u00fd po\u010d\u00edt\u00e1 po\u010det vol\u00e1n\u00ed anotovan\u00e9ho objektu.<\/p>\n<pre><code class=\"plaintext\">@Counted(name = \"fallbackCounter\", \n  displayName = \"Fallback Counter\", \n  description = \"Fallback Counter\")\npublic String salutationFallback() {\n   return fallbackSalutation;\n}\n<\/code><\/pre>\n<p>@ConcurrentGauge<\/p>\n<p>Oz ozna\u010duje gauge, kter\u00fd po\u010d\u00edt\u00e1 po\u010det paraleln\u00edch vol\u00e1n\u00ed anotovan\u00e9ho objektu.<\/p>\n<pre><code class=\"plaintext\">@ConcurrentGuage(\n  name = \"fallbackConcurrentGauge\", \n  displayName=\"Fallback Concurrent\", \n  description=\"Fallback Concurrent\")\npublic String salutationFallback() {\n   return fallbackSalutation;\n}\n<\/code><\/pre>\n<p>@Gauge<\/p>\n<p>Oz ozna\u010duje gauge, kter\u00fd m\u011b\u0159\u00ed hodnotu anotovan\u00e9ho objektu.<\/p>\n<pre><code class=\"plaintext\">@Metered(name = \"FallbackGauge\",\n   displayName=\"Fallback Gauge\",\n   description=\"Fallback frequency\")\npublic String salutationFallback() {\n   return fallbackSalutation;\n}\n<\/code><\/pre>\n<p>@Metered<\/p>\n<p>Oz ozna\u010duje meter, kter\u00fd sleduje frekvenci vol\u00e1n\u00ed anotovan\u00e9ho objektu.<\/p>\n<pre><code class=\"plaintext\">@Metered(name = \"MeteredFallback\",\n   displayName=\"Metered Fallback\",\n   description=\"Fallback frequency\")\npublic String salutationFallback() {\n   return fallbackSalutation;\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/metric\/\" class=\"user_link\">Metrika<\/a><\/noindex><\/p>\n<p>Anotace obsahuj\u00edc\u00ed informace o metadatech p\u0159i p\u0159\u00edjmu po\u017eadavku na vytvo\u0159en\u00ed nebo v\u00fdrobu metriky.<\/p>\n<pre><code class=\"plaintext\">@Metric\n@Metered(name = \"MeteredFallback\",\n   displayName=\"Metered Fallback\",\n   description=\"Fallback frequency\")\npublic String salutationFallback() {\n   return fallbackSalutation;\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/timed\/\" class=\"user_link\">\u010casov\u00e1 osa<\/a><\/noindex><\/p>\n<p>Oz ozna\u010duje \u010dasova\u010d, kter\u00fd sleduje trv\u00e1n\u00ed anotovan\u00e9ho objektu.<\/p>\n<pre><code class=\"plaintext\">@Timed(name = \"TimedFallback\",\n   displayName=\"Timed Fallback\",\n   description=\"Fallback delay\")\npublic String salutationFallback() {\n   return fallbackSalutation;\n}\n<\/code><\/pre>\n<p>\n<b>Koncov\u00e9 body metrik (Metrics Endpoints)<\/b><\/p>\n<p>Metriky aplikac\u00ed <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics\/application<br \/>\nZ\u00e1kladn\u00ed metriky <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics\/base<br \/>\nVendor metriky <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics\/vendor<br \/>\nV\u0161echny metriky <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics<\/p>\n<h4>Rest klient MicroProfile<\/h4>\n<p>\nMikroslu\u017eby \u010dasto poskytuj\u00ed koncov\u00e9 body RESTful, pro jejich\u017e pou\u017eit\u00ed jsou pot\u0159eba odpov\u00eddaj\u00edc\u00ed klientsk\u00e9 API. K pr\u00e1ci s RESTful koncov\u00fdmi body obvykle v\u00fdvoj\u00e1\u0159i Spring pou\u017e\u00edvaj\u00ed RestTemplate. Quarkus v\u0161ak nab\u00edz\u00ed pro tento \u00fakol API rozhran\u00ed MicroProfile Rest Client, jejich\u017e p\u0159\u00edklady pou\u017eit\u00ed jsou uvedeny v tabulce 8.<\/p>\n<p>V <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projektu z na\u0161eho p\u0159\u00edkladu<\/a><\/noindex> Pou\u017eit\u00ed RESTful koncov\u00fdch bod\u016f se prov\u00e1d\u00ed pomoc\u00ed MicroProfile Rest Client. Dal\u0161\u00ed informace a p\u0159\u00edklady naleznete v pr\u016fvodci Quarkus <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/rest-client\">Pr\u016fvodce Rest Client<\/a><\/noindex>.<\/p>\n<p><i>Tabulka 8. P\u0159\u00edklady pou\u017eit\u00ed API rozhran\u00ed MicroProfile Rest Client.<\/i><\/p>\n<p>Funkce MicroProfile Rest Client<br \/>\nPopis<br \/>\nP\u0159\u00edklady<\/p>\n<p>@RegisterRestClient<\/p>\n<p>Registruje typizovan\u00e9 Java rozhran\u00ed jako REST klienta<\/p>\n<pre><code class=\"plaintext\">@RegisterRestClient\n@Path(\"\/\")\npublic interface MyRestClient {\n    @GET\n    @Produces(MediaType.TEXT_PLAIN)\n    public String getSalutation();\n}\n<\/code><\/pre>\n<p>@RestClient<\/p>\n<p>Oz ozna\u010duje injekci instance typizovan\u00e9ho rozhran\u00ed REST klienta<\/p>\n<pre><code class=\"plaintext\">@Autowired \/\/ nebo @Inject\n@RestClient\nMyRestClient restClient;\n<\/code><\/pre>\n<p>Invocation<\/p>\n<p>Vol\u00e1 koncov\u00fd bod REST<\/p>\n<pre><code class=\"plaintext\">System.out.println(\n   restClient.getSalutation());\n<\/code><\/pre>\n<p>mp-rest\/url<\/p>\n<p>Stanov\u00ed koncov\u00fd bod REST<\/p>\n<pre><code class=\"plaintext\">application.properties:\norg.example.MyRestClient\/mp-rest\/url=\n   http:\/\/localhost:8081\/myendpoint\n<\/code><\/pre>\n<p><\/p>\n<h3>Z\u00e1v\u011bry<\/h3>\n<p>\nV tomto blogu, kter\u00fd bude prim\u00e1rn\u011b u\u017eite\u010dn\u00fd pro v\u00fdvoj\u00e1\u0159e Spring, se stru\u010dn\u011b pod\u00edv\u00e1me na to, jak v Quarkus pou\u017e\u00edvat API rozhran\u00ed Spring spolu s API rozhran\u00edmi MicroProfile k vyv\u00edjen\u00ed mikroslu\u017eeb Java a n\u00e1sledn\u00e9mu kompilov\u00e1n\u00ed do nativn\u00edho bin\u00e1rn\u00edho k\u00f3du, kter\u00fd \u0161et\u0159\u00ed stovky megabajt\u016f RAM a startuje b\u011bhem n\u011bkolika milisekund.<\/p>\n<p>Jak jste asi pochopili, dal\u0161\u00ed informace o podpo\u0159e API rozhran\u00ed Spring a MicroProfile, stejn\u011b jako spoustu dal\u0161\u00edch u\u017eite\u010dn\u00fdch informac\u00ed, naleznete v <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/\">pr\u016fvodc\u00edch Quarkus<\/a><\/noindex>.<br \/>\n<br \/>Zdroj: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/redhatrussia\/blog\/497504\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u0438 \u0441 \u0432\u0430\u043c\u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0441\u0442 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u043f\u0440\u043e Quarkus! \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Java-\u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e Eclipse MicroProfile \u0438 Spring Boot \u2013 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 API. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0435 API, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d\u0438 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 runtime-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":79988,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-79987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u0438 \u0441 \u0432\u0430\u043c\u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0441\u0442 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u043f\u0440\u043e Quarkus!\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/cs\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"cs_CZ\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a Quarkus \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 MicroProfile \u0438 Spring | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u0438 \u0441 \u0432\u0430\u043c\u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0441\u0442 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u043f\u0440\u043e Quarkus!\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/cs\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-01T23:42:42+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-05-01T23:42:42+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Jak Quarkus spojuje MicroProfile a Spring | ProHoster","description":"Ahoj v\u0161em, a zde je t\u0159et\u00ed p\u0159\u00edsp\u011bvek ze s\u00e9rie o Quarkusu!","canonical_url":"https:\/\/prohoster.info\/cs\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"cs_CZ","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a Quarkus \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 MicroProfile \u0438 Spring | ProHoster","og:description":"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u0438 \u0441 \u0432\u0430\u043c\u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0441\u0442 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u043f\u0440\u043e Quarkus!","og:url":"https:\/\/prohoster.info\/cs\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-05-01T23:42:42+00:00","article:modified_time":"2020-05-01T23:42:42+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"79987","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 16:27:13","updated":"2022-09-30 14:08:43","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/posts\/79987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/comments?post=79987"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/posts\/79987\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/media\/79988"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/media?parent=79987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/categories?post=79987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/cs\/wp-json\/wp\/v2\/tags?post=79987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}