Spring Core

Related Tags

Tutorials

Spring Framework

Spring @Lookup Method Injection

Spring lookup method injection is the container’s ability to override methods on container-managed beans and return another container-managed bean.

Spring: Injecting Prototype Bean into Singleton Bean

Spring context supports singleton and prototype bean scopes along with four other scopes specific to the web context. The singleton is the default bean scope. A common problem arises when we want to inject a prototype-scoped bean into a singleton-scoped bean. In this case, as the singleton bean is initialized …

Spring Annotations List

Learn about the most widely used spring annotations. In this tutorial, we will briefly cover the important annotations which are provided by spring core to define beans and create complex application context configurations. 1. Annotations in Spring Framework Similar to other places, annotations help by providing metadata and instructions to …

Spring Interview Questions with Answers

This page lists the most asked and important Spring framework interview questions that we may face in our next job interview. 1. What is Spring Framework? What are it’s Main Modules? Spring is probably the most used Java framework for developing simple web applications to enterprise-class cloud applications and microservices. …

Spring BeanPostProcessor Example

Spring BeanPostProcessor allows for custom modification of new bean instances created by spring bean factory. Spring AOP classes use bean post-processors

Spring: Reading an Internal or External Resource

Learn different ways to load resources or files (e.g. text files, XML files, properties files, or image files) into the Spring application context. Spring ResourceLoader provides a unified getResource() method to retrieve an external resource by the resource path. 1. Spring Resource Interface The Spring Resource is a general interface …

Spring static factory-method example

In Spring framework, if you want to create a bean by invoking a static factory-method, whose purpose is to encapsulate the object-creation process in a static method then you could use factory-method attribute. Read More : Spring FactoryBean Static factory method example If you want to create different EmployeeDTO objects …

Spring FactoryBean with Example

In Spring, FactoryBean creates beans that cannot be created using the ‘new’ keyword and involve complex initialization or configuration.

Spring version-less schema for latest version

If you have worked on Spring framework projects, then you must have seen spring context configuration files (e.g. applicationContext.xml) where in header you specify the schema references (.xsd) for various spring modules. In schema references, we mention the xml namespace and as well as schema version number. Well specifying schema …

Spring Bean Autowire by Constructor

Spring bean autowiring “byConstructor” is the recommended approach and injects dependencies into a bean by utilizing its constructor.

Spring Bean Autowire ‘byName’ Example

In Spring Framework, autowiring by name is a feature that allows developers to inject dependencies into a bean by matching the property name with the name of the target bean. This is achieved using the @Autowired annotation (Java Configuration) along with the byName attribute (XML Configuration). 1. What is Autowiring …

Spring Bean Scopes

The beans in Spring or Spring Boot can be created in six different scopes: singleton, prototype, request, session, application and websocket.

Spring 3: Timer Tasks

Timer is a utility class which is used to schedule tasks for both one time and repeated execution in spring applications. Timer is dependent on system clock

Spring MVC Interceptor Example – XML and Annotation Java Config

In this Spring tutorial, we will learn to use spring mvc interceptor in spring mvc applications. This tutorial is very short to focus only on spring interceptor configuration and usage. Interceptors, as we know, are special web programming constructs which gets invoked every time when a certain pre-configured web request …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.