javacodegeeks.com javacodegeeks.com

Defining a Resource

In Fielding’s dissertation a Resource is described as:“Any information that can be named” … “a document or image, a temporal service (e.g. “today’s weather in Los Angeles”), a collection of other resources, a non-virtual object (e.g. a person), and so on. In other words, any concept that might be the target of an author’s hypertext reference must fit within the definition of a resource. A resource...

javacodegeeks.com javacodegeeks.com

Hot-deploying into Kubernetes using Telepresence & WAD

When you’re testing your enterprise application in a Kubernetes environment, the turnaround for changing, re-packaging, and re-deploying your application can become quite high. Telepresence aims to mitigate this, by proxying a locally running process into our Kubernetes cluster, as if the local process were part of the cluster. If we combine that approach with a hot-redeploy tool such as WAD we can vastly improve our development...

javacodegeeks.com javacodegeeks.com

Spring Bean Scopes

Introduction:Spring core container instantiates beans and manages their life-cycle. While defining a bean, we can provide its scope. Unless explicitly provided, singleton is the default scope of beans in a Spring container.We have five types of bean scopes available in Spring. In this tutorial, we’ll explore each of them.1. singleton:The singleton scope ensures that there exists only a single instance of that bean per Spring IoC...

javacodegeeks.com javacodegeeks.com

Spring Boot YAML Configuration

In this quick tutorial, we’ll learn how to use a YAML file to configure properties of a Spring Boot application.What is YAML File?Instead of having an application.properties in Spring, we can use the application.yml as our configuration file. YAML is a superset of JSON and we can use it for configuring data. The YAML files are more human-readable, especially when we have a lot of hierarchical configurations in place.Let’s see...

javacodegeeks.com javacodegeeks.com

Spring ClassPathXmlApplicationContext

Introduction:Spring provides two types of containers:BeanFactory: It supports bean instantiating and wiringApplicationContext: It extends the BeanFactory and so provides all those features as that a BeanFactory. Additionally, it provides automatic registration of BeanPostProcessor, internationalization, and many more featuresThe Spring container is responsible for instantiating and managing the lifecycle of Spring beans. The...

javacodegeeks.com javacodegeeks.com

Spring Dependency Injection

Introduction:In a well-designed Java application, the classes should be as independent as possible. Such a design promotes reusability of components. It also makes it easier to unit test the various components.The concept of dependency injection promotes loose coupling among Java objects.In this tutorial, we’ll talk about the dependency injection in Spring framework.Inversion Of Control(IoC):Inversion of Control is a software...

javacodegeeks.com javacodegeeks.com

@Component vs @Repository vs @Service in Spring

Introduction:With Spring’s auto-scanning feature, it automatically detects various beans defined in our application. We usually annotate our beans using one of the available Spring annotations – @Component, @Repository, @Service, @Controller.On detecting the bean, Spring simply registers it into the ApplicationContext.In this quick tutorial, we’ll look at the difference between @Component, @Repository, and, @Service Spring...