Home » Archives for Phillip Kruger

Author Archives: Phillip Kruger

Phillip is a software developer and a systems architect who knacks for solving problems. He has a passion for clean code and evolutionary architecture. He blogs about all technical things.

Stylish API

java-interview-questions-answers

In this blog post we are going to look at the new styling and other new options available in OpenAPI and SwaggerUI Quarkus (v1.10.0 +). Styling Default style The default style for Swagger UI has changed from the vanilla Swagger UI to a Quarkus branded page: In this post we mostly focus on Swagger UI, but the styling options also ...

Read More »

Experimental GraphQL

java-interview-questions-answers

This blog post is a follow up on the initial introductory post, Supersonic Subatomic GraphQL, and here we will explore more features, some that is experimental, that we hope to eventually move to the MicroProfile GraphQL Specification (based on your feedback !) We will look at the following: Operational Context – Optimize your downstream processes.Cache – Caching your endpoints.Asynchronous – ...

Read More »

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 »

Proposed namespace for Jakarta EE

java-interview-questions-answers

Disclaimer: This is my personal opinion and does not represent the view of my employer. By now everyone know that we need to rename all javax package names to something else due to the move from Oracle to the Eclipse Foundation. (For reference see Appendix A) At the moment the discussion is basically, should we do this rename all at ...

Read More »

When using JAXB

Not many examples show this, but how you use JAXB in your application can make a huge difference in the performance (and memory usage). The example In this blog post I’ll use an example Object called Membership that looks something like this: We will marshal and unmarshal this object to and from XML using JAXB. Create the context in a ...

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 »