spring-framework (11)

Building a GraphQL service

Let's build a GraphQL Spring Application that will accept GraphQL requests at http://localhost:8080/graphql. First let's navigate to https://start.spring.io. This service pulls in all the dependencies you need for an application and does most of the setup for you. GraphQL is a query language to retrieve…

Continue reading...

Spring Boot on Kubernetes

Enable Kubernetes in Docker Desktop We will use Docker Desktop to provide us a Test Kubernetes Environment. Open Docker Desktop Settings, go to Tab "Kubernetes". Select "Enable Kubernetes", then "Apply & Restart". Now you should be able to see docker-desktop listed, if you run kubectl…

Continue reading...

Building Spring Boot Docker Images

Pre-Requirements Developer Environment ready with Docker, JDK, IDE A Java Spring Boot Project with a h2 in-memory DB Docker Hub account Create Docker File Create a Dockerfile with the following content: FROM openjdk:11-jre-slim ENV JAVA_OPTS " -Xms512m -Xmx512m -Djava.security.egd=file:///dev/./urandom" WORKDIR application COPY target/myapp-0.0.1-SNAPSHOT.jar ./ ENTRYPOINT…

Continue reading...

Data Validation Overview

What is Validation? Validation is a process of making assertions against data to ensure data integrity Is a value required? How long is a phone number? Is it a good date? What is the maximum length of a string? Some refer to data validation as…

Continue reading...

Spring Exception Handling

HTTP Status Codes 100 Series - Informational Responses • 200 Series - Successful Responses 300 Series - Redirection Responses 400 Series - Client Error Responses 500 Series - Server Error Responses Use of HTTP Status Codes 200 Series are used when the request completes as…

Continue reading...