{"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\/sq\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring","title":{"rendered":"Si Quarkus bashkon MicroProfile dhe Spring","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>P\u00ebrsh\u00ebndetje t\u00eb gjith\u00ebve, dhe ja postimi i tret\u00eb nga seria rreth Quarkus!<\/p>\n<p><img decoding=\"async\" alt=\"Si Quarkus bashkon MicroProfile dhe Spring\" src=\"\/wp-content\/uploads\/2020\/05\/d98ff470b49f8de1fa488a6818160969.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nKur zhvilloni mikrosh\u00ebrbime Java, shpesh mendoni se <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/blog\/2019\/02\/28\/jumpstart-microservices-microprofile-starter-beta\/\">Eclipse MicroProfile<\/a><\/noindex> dhe <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/topics\/spring-boot\/\">Spring Boot<\/a><\/noindex> \u00ebsht\u00eb nj\u00eb grup API-sh t\u00eb ndara dhe t\u00eb pavarura nga nj\u00ebra-tjetra. Si rregull, programuesit zakonisht p\u00ebrdorin ato API q\u00eb jan\u00eb m\u00ebsuar me to, pasi studimi i kornizave t\u00eb reja dhe komponenteve runtime k\u00ebrkon shum\u00eb koh\u00eb. Sot do t\u00eb p\u00ebrpiqemi t\u00eb thjeshtojm\u00eb m\u00ebsimin e disa API-ve t\u00eb njohura <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/blog\/2018\/11\/21\/eclipse-microprofile-for-spring-boot-developers\/\">MicroProfile p\u00ebr zhvilluesit e Spring<\/a><\/noindex> dhe do t\u00eb tregojm\u00eb se si t\u00eb angazhojm\u00eb nj\u00ebkoh\u00ebsisht API-t\u00eb e Spring dhe mund\u00ebsit\u00eb e reja t\u00eb dobishme <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/\">Quarkus<\/a><\/noindex>.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nN\u00ebse shkojm\u00eb pak m\u00eb n\u00eb detaje, s\u00eb pari do t\u00eb shqyrtojm\u00eb fush\u00ebn e aplikimit dhe detajet e m\u00ebnyr\u00ebs se si Quarkus mb\u00ebshtet API-t\u00eb e Spring, p\u00ebr t'u treguar zhvilluesve t\u00eb Spring se si t\u00eb aplikojn\u00eb API-t\u00eb MicroProfile n\u00eb pun\u00ebn e tyre t\u00eb p\u00ebrditshme. M\u00eb pas do t\u00eb flasim p\u00ebr API-t\u00eb MicroProfile, t\u00eb cilat do t'i ndihmojn\u00eb zhvilluesit e Spring n\u00eb krijimin e mikrosh\u00ebrbimeve.<\/p>\n<p>Pse pik\u00ebrisht Quarkus? S\u00eb pari, \u00ebsht\u00eb kodim i gjall\u00eb (live coding), dometh\u00ebn\u00eb ajo q\u00eb ndodh automatikisht \u00ebsht\u00eb rikthimi i \u00e7do ndryshimi n\u00eb API-t\u00eb MicroProfile, API-t\u00eb Spring dhe API-t\u00eb e tjera Java, q\u00eb kryhet me nj\u00eb komand\u00eb t\u00eb vetme: mvn quarkus:dev. S\u00eb dyti, q\u00eb po shqyrtojm\u00eb n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">shembullin ton\u00eb<\/a><\/noindex> sh\u00ebrbimi Person (ai kompilon nga API-t\u00eb e Spring, MicroProfile dhe JPA n\u00eb nj\u00eb skedar binar duke p\u00ebrdorur imazhin natyral GraalVM) starton brenda 0.055 sekondash dhe konsumon rreth 90 MB n\u00eb memorie (RSS) n\u00eb pik\u00ebn p\u00ebrfundimtare t\u00eb aplikacionit RESTful. Kompilimi i tij realizohet me nj\u00eb komand\u00eb t\u00eb vetme: mvn package -Pnative.<\/p>\n<p>Nuk do t\u00eb thellohemi n\u00eb detajet e MicroProfile, por do t\u00eb mundohemi t\u00eb ndihmojm\u00eb zhvilluesit e Spring t\u00eb kuptojn\u00eb se si mund t\u00eb p\u00ebrdoren API-t\u00eb e Spring n\u00eb Quarkus s\u00eb bashku me API-t\u00eb e MicroProfile.<\/p>\n<h3>Kontenier\u00ebt dhe Kubernetes<\/h3>\n<p>\nP\u00ebr t\u00eb mos e mbingarkuar k\u00ebt\u00eb artikull, ne do t\u00eb shqyrtojm\u00eb k\u00ebtu vet\u00ebm aspektet e nivelit t\u00eb lart\u00eb t\u00eb mb\u00ebshtetjes <noindex><a rel=\"nofollow\" href=\"https:\/\/developers.redhat.com\/developer-tools\/kubernetes\">Kubernetes<\/a><\/noindex>, pasi kjo \u00ebsht\u00eb e r\u00ebnd\u00ebsishme p\u00ebr t'u kuptuar. Quarkus pozicionohet si nj\u00eb stek Java p\u00ebr Kubernetes, e cila ka p\u00ebr q\u00ebllim t\u00eb minimizoj\u00eb konsumimin e memories dhe koh\u00ebn e nisjes s\u00eb aplikacioneve dhe sh\u00ebrbimeve Java dhe, si pasoj\u00eb, t\u00eb rris\u00eb densitetin e vendosjes s\u00eb tyre n\u00eb host dhe t\u00eb ul\u00eb kostot totale.<\/p>\n<p>Quarkus gjithashtu <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/kubernetes-resources\">mb\u00ebshtet gjenerimin automatik<\/a><\/noindex> e burimeve Kubernetes dhe ofron <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/\">udh\u00ebzimeve<\/a><\/noindex> p\u00ebr implementim n\u00eb platformat Kubernetes dhe Red Hat OpenShift. P\u00ebr m\u00eb tep\u00ebr, Quarkus automatikisht gjeneron skedar\u00ebt Dockerfile.jvm (paketim JVM) dhe Dockerfile.native (paketim binar natyral), t\u00eb nevojsh\u00ebm p\u00ebr krijimin e kontenjereve.<\/p>\n<p>Dhe n\u00eb fund, duke u orientuar n\u00eb Kubernetes si ambientin e tij t\u00eb synuar p\u00ebr implementim, Quarkus nuk p\u00ebrdor kornizat Java n\u00eb rastet kur funksionaliteti i ngjash\u00ebm \u00ebsht\u00eb zbatuar n\u00eb nivelin e vet\u00eb platform\u00ebs Kubernetes. Tabela 1 paraqet nj\u00eb hart\u00eb t\u00eb p\u00ebrputhshm\u00ebris\u00eb funksionale mes Kubernetes dhe kornizave standarde Java q\u00eb p\u00ebrdoren nga zhvilluesit e Spring.<\/p>\n<p><i>Tabela 1. Harta e p\u00ebrputhshm\u00ebris\u00eb funksionale mes kornizave Java dhe Kubernetes.<\/i><\/p>\n<p>Funksionaliteti<br \/>\nSpring Boot tradicional<br \/>\nKubernetes<\/p>\n<p>Zbulimi i sh\u00ebrbimeve<br \/>\nEureka<br \/>\nDNS<\/p>\n<p>Konfigurimi<br \/>\nSpring Cloud Config<br \/>\nConfig Maps \/ Secrets<\/p>\n<p>Balancimi i ngarkes\u00ebs<br \/>\nRibbon (nga ana e klientit)<br \/>\nSh\u00ebrbimi, Controller i riprodhimit (nga ana e serverit)<\/p>\n<p><\/p>\n<h3>Kompilim dhe ekzekutim i kodit nga shembulli<\/h3>\n<p>\nN\u00eb k\u00ebt\u00eb artikull ne referohemi n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">shembulli i projektit<\/a><\/noindex>, ku bashk\u00ebpunohet me API-t\u00eb e Spring dhe MicroProfile dhe madje edhe ai java klas\u00ebn e famshme. Kodi nga ky shembull mund t\u00eb kompozohet dhe ekzekutohet nga linja e komand\u00ebs, shihni m\u00eb shum\u00eb n\u00eb skedarin README.md.<\/p>\n<h3>API-t\u00eb e Spring Framework<\/h3>\n<p><\/p>\n<h4>Injektimi i var\u00ebsis\u00eb<\/h4>\n<p>\nQuarkus mb\u00ebshtet nj\u00eb gam\u00eb t\u00eb gjer\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/cdi-reference\">API-t\u00eb e konteksteve dhe injektimit t\u00eb var\u00ebsive (CDI)<\/a><\/noindex> dhe API-t\u00eb e injektimit t\u00eb var\u00ebsive t\u00eb Spring (Spring DI). N\u00ebse po punoni me 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 dhe Jakarta EE<\/a><\/noindex>, at\u00ebher\u00eb jeni tashm\u00eb t\u00eb njohur me CDI. Nga ana tjet\u00ebr, zhvilluesit e Spring mund t\u00eb p\u00ebrdorin Quarkus Extension for Spring DI API p\u00ebr t\u00eb siguruar p\u00ebrputhshm\u00ebrin\u00eb me Spring DI. Shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura nga Spring DI jan\u00eb paraqitur n\u00eb tabela 2.<\/p>\n<p>N\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projekti nga shembulli yn\u00eb<\/a><\/noindex> p\u00ebrdor si CDI ashtu edhe Spring Dependency Injection. Informacione t\u00eb tjera dhe shembuj rreth k\u00ebsaj teme mund t\u00eb gjenden n\u00eb udh\u00ebzimin Quarkus, i quajtur <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/spring-di\">Spring DI Guide<\/a><\/noindex>.<\/p>\n<p><i>Tabela 2. Shembuj t\u00eb p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura nga Spring DI.<\/i><\/p>\n<p>Funksionet e mb\u00ebshtetura t\u00eb Spring DI<br \/>\nShembuj<\/p>\n<p>Injection me Konstruktor<\/p>\n<pre><code class=\"plaintext\">public PersonSpringController(\n   PersonSpringRepository personRepository,  \/\/ injektuar      \n   PersonSpringMPService personService) {    \/\/ injektuar\n      this.personRepository = personRepository;\n      this.personService = personService;\n}\n<\/code><\/pre>\n<p>Injection n\u00eb Fush\u00eb<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\">Vlera<\/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\">Komponent<\/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\">Sh\u00ebrbimi<\/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>Korniza e uebit<\/h4>\n<p>\nP\u00ebrdoruesve t\u00eb MicroProfile do t'u p\u00eblqej\u00eb q\u00eb Quarkus mb\u00ebshtet JAX-RS, MicroProfile Rest Client, JSON-P dhe JSON-B si modelin kryesor t\u00eb programimit t\u00eb uebit. Zhvilluesit e Spring do t\u00eb g\u00ebzohen nga mb\u00ebshtetja e re e Quarkus p\u00ebr Spring Web API, ve\u00e7an\u00ebrisht p\u00ebr nd\u00ebrfaqet q\u00eb lidhen me REST. N\u00eb p\u00ebrputhje me Spring DI, q\u00ebllimi kryesor i mb\u00ebshtetjes p\u00ebr Spring Web API \u00ebsht\u00eb q\u00eb zhvilluesit e Spring t\u00eb mund t\u00eb p\u00ebrdorin nd\u00ebrfaqet e API-ve t\u00eb Spring Web s\u00eb bashku me ato t\u00eb MicroProfile. Shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetur t\u00eb Spring Web Jepen n\u00eb tabel\u00ebn 3, nd\u00ebrsa informacione t\u00eb tjera dhe shembuj mbi k\u00ebt\u00eb tem\u00eb mund t\u00eb gjenden n\u00eb udh\u00ebzuesin e Quarkus, i quajtur <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/spring-web\">Udh\u00ebzuesi p\u00ebr Spring Web<\/a><\/noindex>.<\/p>\n<p><i>Tabela 3. Shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetur t\u00eb Spring Web.<\/i><\/p>\n<p>Funksionet e mb\u00ebshtetura t\u00eb Spring Web<br \/>\nShembuj<\/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 (pjes\u00ebrisht)<\/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>\nP\u00ebrdoruesit e MicroProfile gjithashtu do t\u00eb p\u00eblqejn\u00eb se Quarkus mb\u00ebshtet JPA me p\u00ebrdorimin e Hibernate ORM. Ka edhe lajme t\u00eb mira p\u00ebr zhvilluesit e Spring: Quarkus mb\u00ebshtet annotimet dhe tipet e zakonshme t\u00eb Spring Data JPA. shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura t\u00eb Spring Data JPA paraqiten n\u00eb tabel\u00ebn 4.<br \/>\nN\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projekti nga shembulli yn\u00eb<\/a><\/noindex> p\u00ebrdoren API-t\u00eb e Spring Data JPA, dhe informacioni shtes\u00eb \u00ebsht\u00eb n\u00eb dispozicion n\u00eb udh\u00ebzuesin Quarkus t\u00eb quajtur <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/spring-data-jpa-guide\">Udh\u00ebzuesi Spring Data JPA<\/a><\/noindex>.<\/p>\n<p><i>Tabela 4. Shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura t\u00eb Spring Data JPA.<\/i><\/p>\n<p>Funksionet e mb\u00ebshtetura t\u00eb Spring Data JPA<br \/>\nShembuj<\/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>Fraksionet e Repository<\/p>\n<pre><code class=\"plaintext\">public interface PersonRepository\n         extends JpaRepository,\n                 PersonFragment {\n   ...\n}\n<\/code><\/pre>\n<p>Metodat e pyetjeve t\u00eb derivezuara<\/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>Pyetje t\u00eb p\u00ebrdoruesve<\/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-t\u00eb e MicroProfile<\/h3>\n<p><\/p>\n<h4>Tolerance ndaj d\u00ebshtimeve (Fault tolerance)<\/h4>\n<p>\nKonstruksionet e toleranc\u00ebs ndaj defekteve jan\u00eb shum\u00eb t\u00eb r\u00ebnd\u00ebsishme p\u00ebr parandalimin e d\u00ebshtimeve kaskad\u00eb dhe krijimin e arkitekturave t\u00eb besueshme t\u00eb mikrosh\u00ebrbimeve. Zhvilluesit e Spring kan\u00eb p\u00ebrdorur p\u00ebr nj\u00eb koh\u00eb t\u00eb gjat\u00eb circuit-breaker p\u00ebr q\u00ebllime t\u00eb toleranc\u00ebs ndaj defekteve. <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Netflix\/Hystrix\">Hystrix<\/a><\/noindex>. Megjithat\u00eb, Hystrix nuk \u00ebsht\u00eb p\u00ebrdit\u00ebsuar p\u00ebr nj\u00eb koh\u00eb t\u00eb gjat\u00eb, nd\u00ebrsa toleranca ndaj defekteve e MicroProfile \u00ebsht\u00eb aktivisht n\u00eb zhvillim dhe ka disa vite p\u00ebrvoj\u00eb n\u00eb prodhim. Prandaj, p\u00ebr t\u00eb rritur besueshm\u00ebrin\u00eb e sh\u00ebrbimeve n\u00eb Quarkus, rekomandohet t\u00eb p\u00ebrdoren API-t\u00eb e MicroProfile Fault Tolerance, shembujt e p\u00ebrdorimit t\u00eb t\u00eb cilave jepen n\u00eb tabel\u00ebn 5. Informacione shtes\u00eb mbi k\u00ebt\u00eb mund t\u00eb gjenden n\u00eb udh\u00ebzuesin e Quarkus. <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/microprofile-fault-tolerance\">Udh\u00ebzuesi i Toleranc\u00ebs ndaj Defekteve<\/a><\/noindex>.<\/p>\n<p><i>Tabela 5. Shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura t\u00eb MicroProfile Fault Tolerance.<\/i><\/p>\n<p>Funksionet e MicroProfile Fault Tolerance<br \/>\nP\u00ebrshkrimi<br \/>\nShembuj<\/p>\n<p>@Asynchronous<\/p>\n<p>Ekzekutimi i logjik\u00ebs n\u00eb nj\u00eb thread t\u00eb ve\u00e7ant\u00eb<\/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>Kufizimi i numrit t\u00eb k\u00ebrkesave t\u00eb nj\u00ebkohshme<\/p>\n<pre><code class=\"plaintext\">@Bulkhead(5)\npublic void fiveConcurrent() {\n   makeRemoteCall(); \/\/...\n}\n<\/code><\/pre>\n<p>@CircuitBreaker<\/p>\n<p>P\u00ebrpunimi inteligjent i gabimeve dhe rikuperimi nga d\u00ebshtimet<\/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>Thirrje e logjik\u00ebs alternative n\u00eb rast d\u00ebshtimi<\/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\">Rivendosje<\/a><\/noindex><\/p>\n<p>Rivendosje n\u00eb rast d\u00ebshtimi t\u00eb k\u00ebrkes\u00ebs<\/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\">Koh\u00eb Skadimi<\/a><\/noindex><\/p>\n<p>Kontrolli i koh\u00ebs s\u00eb pritjes n\u00eb rast d\u00ebshtimi<\/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>Kontrolli i Sh\u00ebrbimeve (Sh\u00ebndeti i Sh\u00ebrbimeve)<\/h4>\n<p>\nPlatforma Kubernetes monitoron sh\u00ebndetin e kontejner\u00ebve p\u00ebrmes sh\u00ebrbimeve t\u00eb ve\u00e7anta. P\u00ebr t\u00eb lejuar platform\u00ebn n\u00eb shtres\u00eb posht\u00eb t\u00eb monitoroj\u00eb sh\u00ebrbimet, zhvilluesit e Spring zakonisht p\u00ebrdorin HealthIndicator dhe Spring Boot Actuator. N\u00eb Quarkus, kjo mund t\u00eb b\u00ebhet p\u00ebrmes MicroProfile Health, t\u00eb cilat p\u00ebr default kryejn\u00eb kontroll t\u00eb gjall\u00ebris\u00eb (liveness check), por mund t\u00eb konfigurohen gjithashtu p\u00ebr t\u00eb kontrolluar nj\u00ebher\u00ebsh gjall\u00ebrin\u00eb dhe gatishm\u00ebrin\u00eb (readiness). Shembujt e p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura t\u00eb MicroProfile Health jepen n\u00eb tabel\u00ebn 6, dhe informacione t\u00eb tjera jan\u00eb t\u00eb disponueshme n\u00eb udh\u00ebzimin e Quarkus. <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/microprofile-health\">Udh\u00ebzuesi i Sh\u00ebndetit<\/a><\/noindex>.<\/p>\n<p><i>Tabela 6. Shembuj t\u00eb p\u00ebrdorimit t\u00eb API-ve t\u00eb mb\u00ebshtetura t\u00eb MicroProfile Health.<\/i><\/p>\n<p>Funksionalitetet e MicroProfile Health<br \/>\nP\u00ebrshkrimi<br \/>\nShembuj<\/p>\n<p>@Liveness<\/p>\n<p>Platforma fytyra riparon aplikacionet kontejnerizuese q\u00eb nuk funksionojn\u00eb.<br \/>\nPika:<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 nuk do t\u00eb d\u00ebrgoj\u00eb trafik n\u00eb aplikacionet e containerizuara n\u00eb rast se ato nuk jan\u00eb gati<br \/>\nPika:<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>Metricat<\/h4>\n<p>\nAplikacionet ofrojn\u00eb metrika p\u00ebr q\u00ebllime operative (p\u00ebr monitorimin e parametrave t\u00eb performanc\u00ebs SLA) ose jooperuese (parametrat e biznesit SLA). Zhvilluesit e Spring ofrojn\u00eb metrika p\u00ebrmes Spring Boot Actuator dhe Micrometer. Nga ana tjet\u00ebr, Quarkus p\u00ebrdor MicroProfile Metrics p\u00ebr t\u00eb ofruar metrika themelore (JVM dhe sistemi operativ), metrika t\u00eb ofruara nga shit\u00ebsit (Quarkus), dhe metrika aplikacionesh. MicroProfile Metrics k\u00ebrkon q\u00eb implementimi t\u00eb mb\u00ebshtes\u00eb formate dal\u00ebse JSON dhe OpenMetrics (Prometheus). Shembuj p\u00ebr p\u00ebrdorimin e MicroProfile Metrics API jepen n\u00eb tabel\u00ebn 7.<\/p>\n<p>N\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projekti nga shembulli yn\u00eb<\/a><\/noindex> MicroProfile Metrics p\u00ebrdoren p\u00ebr ofrimin e metrikave t\u00eb aplikacionit. Informacione shtes\u00eb mund t\u00eb gjenden n\u00eb udh\u00ebzuesin e Quarkus. <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/microprofile-metrics\">Udh\u00ebzues p\u00ebr Metrik\u00ebn<\/a><\/noindex>.<\/p>\n<p><i>Tabela 7. Shembuj t\u00eb p\u00ebrdorimit t\u00eb API-ve MicroProfile Metrics.<\/i><\/p>\n<p>Funksionet e MicroProfile Metrics<br \/>\nP\u00ebrshkrimi<br \/>\nShembuj<\/p>\n<p>@Counted<\/p>\n<p>Tregon nj\u00eb num\u00ebrues, i cili llogarit numrin e thirrjeve t\u00eb objektit t\u00eb annotuar<\/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>Tregon nj\u00eb sensor, i cili llogarit numrin e thirrjeve paralele t\u00eb objektit t\u00eb annotuar<\/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>Tregon nj\u00eb sensor, i cili mat vler\u00ebn e objektit t\u00eb annotuar<\/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>Tregon nj\u00eb sensor q\u00eb ndjek frekuenc\u00ebn e thirrjeve p\u00ebr objektin e annotuar<\/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\">Metrik\u00eb<\/a><\/noindex><\/p>\n<p>Annotation q\u00eb p\u00ebrmban informacion mbi metadata, kur b\u00ebhet nj\u00eb k\u00ebrkes\u00eb p\u00ebr t\u00eb regjistruar ose prodhuar nj\u00eb metrik\u00eb<\/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\">E matur<\/a><\/noindex><\/p>\n<p>P\u00ebrcakton nj\u00eb timer q\u00eb ndjek koh\u00ebzgjatjen e objektit t\u00eb annotuar<\/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>Pikat e fundit t\u00eb metrik\u00ebs (Metrics Endpoints)<\/b><\/p>\n<p>Metrikat e aplikacioneve <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics\/application<br \/>\nMetrikat baz\u00eb <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics\/base<br \/>\nMetrikat e ofruesit <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics\/vendor<br \/>\nT\u00eb gjitha metrikat <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost\">localhost<\/a><\/noindex>:8080\/metrics<\/p>\n<h4>Klienti Rest MicroProfile<\/h4>\n<p>\nMikros\u00ebrvicat shpesh ofrojn\u00eb pika p\u00ebrfundimtare RESTful, p\u00ebr t\u00eb cilat nevojiten API-t\u00eb e klientit p\u00ebrkat\u00ebse. P\u00ebr t\u00eb p\u00ebrdorur pikat p\u00ebrfundimtare RESTful, zhvilluesit e Spring zakonisht p\u00ebrdorin RestTemplate. Quarkus ofron p\u00ebr k\u00ebt\u00eb q\u00ebllim API-in e Klientit Rest t\u00eb MicroProfile, t\u00eb cilat ilustrohen n\u00eb tabel\u00ebn 8.<\/p>\n<p>N\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jclingan\/quarkus-spring-microprofile\">projekti nga shembulli yn\u00eb<\/a><\/noindex> p\u00ebrdorimi i pikat p\u00ebrfundimtare RESTful kryhet p\u00ebrmes Klientit Rest t\u00eb MicroProfile. Informacione t\u00eb tjera dhe shembuj mbi k\u00ebt\u00eb tem\u00eb mund t\u00eb gjenden n\u00eb udh\u00ebzimin e Quarkus <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/rest-client\">Udh\u00ebzuesi p\u00ebr Klientin Rest<\/a><\/noindex>.<\/p>\n<p><i>Tabel\u00eb 8. Shembuj t\u00eb p\u00ebrdorimit t\u00eb API-ve t\u00eb Klientit Rest t\u00eb MicroProfile.<\/i><\/p>\n<p>Karakteristikat e Klientit Rest t\u00eb MicroProfile<br \/>\nP\u00ebrshkrimi<br \/>\nShembuj<\/p>\n<p>@RegisterRestClient<\/p>\n<p>Regjistron nj\u00eb interface t\u00eb tipizuar Java si nj\u00eb klient REST<\/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>Sh\u00ebnon implementimin e nj\u00eb instance t\u00eb interfesit t\u00eb tipizuar t\u00eb klientit REST<\/p>\n<pre><code class=\"plaintext\">@Autowired \/\/ ose @Inject\n@RestClient\nMyRestClient restClient;\n<\/code><\/pre>\n<p>Thirrje<\/p>\n<p>Thirr nj\u00eb pik\u00eb fundore REST<\/p>\n<pre><code class=\"plaintext\">System.out.println(\n   restClient.getSalutation());\n<\/code><\/pre>\n<p>mp-rest\/url<\/p>\n<p>P\u00ebrcakton pik\u00ebn fundore 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>P\u00ebrfundimet<\/h3>\n<p>\nN\u00eb k\u00ebt\u00eb blog, i cili do t\u00eb jet\u00eb ve\u00e7an\u00ebrisht i dobish\u00ebm p\u00ebr zhvilluesit Spring, ne do t\u00eb shqyrtojm\u00eb shkurtimisht se si t\u00eb p\u00ebrdorim API-t\u00eb Spring me API-t\u00eb MicroProfile n\u00eb Quarkus p\u00ebr t\u00eb zhvilluar mikrosh\u00ebrbime Java dhe pastaj t\u2019i kompilohet ato n\u00eb nj\u00eb kod binar natyror q\u00eb kursen qindra megabajt memorie dhe ngarkon n\u00eb pak milisekonda.<\/p>\n<p>Si\u00e7 e keni kuptuar, informacion t\u00eb m\u00ebtejsh\u00ebm n\u00eb lidhje me mb\u00ebshtetje p\u00ebr API-t\u00eb Spring dhe MicroProfile, si dhe shum\u00eb informacione t\u00eb tjera t\u00eb dobishme mund t\u00eb gjeni n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/quarkus.io\/guides\/\">udh\u00ebzimet Quarkus<\/a><\/noindex>.<br \/>\n<br \/>Burimi: <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 4.9.10 - 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! \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\" \/>\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\/sq\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\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! \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\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/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\udd47Si Quarkus bashkon MicroProfile dhe Spring | ProHoster","description":"P\u00ebrsh\u00ebndetje t\u00eb gjith\u00ebve, dhe po jemi me postimin e tret\u00eb nga seria mbi Quarkus! Gjat\u00eb zhvillimit t\u00eb mik Services Java shpesh mendohet se Eclipse MicroProfile dhe Spring Boot jan\u00eb API t\u00eb ndara dhe t\u00eb pavarura nga nj\u00ebra-tjetra. N\u00eb p\u00ebrgjith\u00ebsi, programuesit zakonisht p\u00ebrdorin ato API me t\u00eb cilat jan\u00eb m\u00ebsuar, pasi t\u00eb m\u00ebsosh framework-e dhe komponent\u00eb runtime t\u00eb rinj k\u00ebrkon shum\u00eb koh\u00eb. Sot ne","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kak-quarkus-obedinyaet-microprofile-i-spring","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","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! \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","og:url":"https:\/\/prohoster.info\/sq\/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"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/79987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=79987"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/79987\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/79988"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=79987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=79987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=79987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}