Home » MicroProfile

Tag Archives: MicroProfile

MicroProfile OpenAPI for everyone

java-interview-questions-answers

MicroProfile OpenAPI is primarily used for adding OpenAPI to JAX-RS Endpoints. In this blog post we will look at how the SmallRye Implementation extends this with some extra features, and support for more web frameworks, when used in Quarkus. Using Quarkus The example code is available here. You can also initialize a project using code.quarkus.io – just make sure to ...

Read More »

Supersonic Subatomic GraphQL

java-interview-questions-answers

MicroProfile GraphQL is now included in the just released version 1.5.0 of Quarkus. You can now use code.quarkus.io to get going with Quarkus and include the SmallRye GraphQL Extension. This will create a Quarkus starter application with the following dependencies: <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-graphql</artifactId> </dependency> NOTE: At ...

Read More »

Swagger UI on MicroProfile OpenAPI

java-interview-questions-answers

MicroProfile OpenApi gives us a standardized way to describe our JAX-RS API’s using OpenApi 3. If you have used swagger-jaxrs and swagger-annotations before, this will feel very familiar to you as OpenApi is built on the Swagger base. On Nov. 5, 2015, SmartBear in conjunction with 3Scale, Apigee, Capital One, Google, IBM, Intuit, Microsoft, PayPal, and Restlet announced the formation ...

Read More »

Reusable MicroProfile Health probes

java-interview-questions-answers

MicroProfile Health API is a very basic API to report the state of your service, based on one or more Health Probe. It’s very useful in scenarios where some Server or Cluster Controller need to decide if and when your instance should be restarted. Using MicroProfile Health API in your application is as simple as implementing one (or more) org.eclipse.microprofile.health.HealthCheck ...

Read More »

A configurable JAX-RS ExceptionMapper with MicroProfile Config

java-interview-questions-answers

When you create REST services with JAX-RS, you typically either return nothing (so HTTP 201/2/4 etc) or some data, potentially in JSON format (so HTTP 200), or some Exception / Error (so HTTP 4xx or 5xx). We usually translate a Runtime Exception into some HTTP 5xx and a Checked Exception into some 4xx. Because we want to keep our boundary ...

Read More »

Your own MicroProfile Config source

java-interview-questions-answers

MicroProfile Config, that is part of the MicroProfile Specification, is the standardization for Java Enterprise and Microservices configuration. Out of the box (i.e. mandatory for all implementations as defined by the specification) there are 3 ways to define your configuration: System.getProperties() System.getenv() All META-INF/microprofile-config.properties on the classpath The ordinal of these Config Sources determine the order in which the System ...

Read More »

Running Eclipse MicroProfile on Microsoft Azure

java-interview-questions-answers

In this post, I am following up on the post series about Running Eclipse MicroProfile applications in Oracle Cloud by showing how to do it in Microsoft Azure Web Apps for Containers. I am using the same simple application called CloudEE Duke as in the previous posts. The only difference is that I now package the applications as Docker Images. ...

Read More »