Home » Spring » Page 9

Tag Archives: Spring

Angular 8 + Spring Boot 2.2: Build a CRUD App Today!

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. If you’ve been a Java developer for more than 15 years, you probably remember when there were a plethora of Java web frameworks. It started with Struts ...

Read More »

Spring Bean Scopes

spring-interview-questions-answers

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 ...

Read More »

Reactive Relational Database Transactions

spring-interview-questions-answers

Spring Framework announced recently to ship with support for reactive transaction management.Let’s take an in-depth look at how this works for R2DBC, the reactive specification for SQL database access. Transaction Management is a pattern and not technology-specific. From that perspective, its properties and runtime behavior are a function of the implementing technology. TL; DR: From a database perspective, imperative and ...

Read More »

Spring ClassPathXmlApplicationContext

spring-interview-questions-answers

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 features The Spring container is responsible for instantiating and managing the lifecycle of Spring beans. The ClassPathXmlApplicationContext is a class that ...

Read More »

Angular 8 + Spring Boot 2.2: Build a CRUD App Today!

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. If you’ve been a Java developer for more than 15 years, you probably remember when there were a plethora of Java web frameworks. It started with Struts ...

Read More »

Spring MVC Annotations

spring-interview-questions-answers

Introduction: Spring 2.5 onwards, we can use annotations to mark our Spring components. One way of doing so is to use a <component-scan> tag in our appConfig.xml: <context:component-scan base-package="com.programmergirl" /> The Spring container will then recursively scan all components in the given package & its sub-packages. In this quick tutorial, we’ll discuss the most commonly used Spring MVC annotations. Defining ...

Read More »

Spring Dependency Injection

spring-interview-questions-answers

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 ...

Read More »

Spring Boot Exit Codes – Create Custom Exit Code

spring-interview-questions-answers

When running a Spring Boot application, we get a system exit code of 0, when everything goes fine.  For any unhandled exceptions, the application returns with an exit code 1. It’s possible for us to return a custom exit code from our Spring Boot application. In this tutorial, we’ll learn to do so. Implementing ExitCodeGenerator: Let’s start by creating a ...

Read More »

Using @ResponseStatus for Http Status in Spring

spring-interview-questions-answers

Introduction: In Spring MVC, we can set the status of the HttpResponse in several ways. In this tutorial, we’ll achieve it using the @ResponseStatus annotation. We can use @ResponseStatus to mark a method or an exception class with a status code and reason that should be returned. On invoking the marked handler method or when a specified exception is thrown, ...

Read More »