Blog Archives

03: Spring boot MVC tutorial with thymeleaf & bean validation

Step 1: Create a “simple-spring-mvc” maven project.

Step 2: Import the project into eclipse. File > Import -> Existing Maven Projects and select “C:\Users\java-_000\projects\simple-spring-mvc”. Step 3: The pom.xml file should look like:

“spring-boot-starter-thymeleaf” is used instead of “spring-boot-starter-web” as it allows you to use htmls instead of JSPs…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Spring boot, Spring Boot Tutorial

Spring IO tutorial in 6 steps

Spring IO Platform is all about “list of dependencies and their versions that work well together”. It is implemented as a Maven POM file via Maven Bill-of-Materials dependency that you can import into your projects to set the versions for dependencies. Spring Boot is built on top of the “Spring…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Spring IO, Spring IO Tutorial

02: Simple Spring Boot Restful Web Service Tutorial

This tutorial extends Simple Spring Boot Tutorial in 8 steps. Step 1: The pom.xml file that was created in the previous Spring boot tutorial needs to be changed from “spring-boot-starter-actuator” to “spring-boot-starter-web”

Step 2: Add additional logic to the “App.java” to turn it into a controller to be invoked…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Spring boot, Spring Boot Tutorial

01: Simple Spring Boot Tutorial in 8 steps

Assumes that your Java, Maven, and eclipse are set up as per: Setting up Java, Maven, and eclipse Step 1: Create a simple maven project using the maven “archetype” plugin.

The above command creates a folder “simple-spring-boot” Step 2: import it into eclipse by choosing File –> Import –>…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Spring boot, Spring Boot Tutorial

Spring loading properties files with ApplicationContextInitializer

Spring 3.1 introduced a very convenient hook for customizing the application context with ApplicationContextInitializer. It can be used to set active profiles and register custom property sources.

The web.xml can configure the “contextInitializerClasses”.

It can also be used in JUnit tests as shown below.

Posted in Spring other tutorial

CDI annotations @Named and @Inject Dependency Injection in Spring 3.0 Tutorial

In Spring 3.0 the support for the CDI annotations @Named and @Inject are provided. 1) @Inject instead of Spring’s @Autowired to inject a bean. 2) @Named instead of Spring’s @Component to declare a bean. Step 1: Create a simple Maven project. Just press enter for all the prompts.

Step

Read more ›

Posted in Spring Basics Tutorial

♥ Spring lookup-method example to inject prototype scoped bean into a singleton scoped bean

Step 1: You need asm and cgilib libraries in addition to Spring libraries shown below. Step 2: define the Dao (Data Access Object) interface.

Step 3: Define the Dao implementation.

Step 4: Define the service interface.

Step 5: Define the service implementation. Note that the class is

Read more ›

Posted in Spring Basics Tutorial
Tags:

♥ Top 6 Spring wiring via JavaConfig [i.e. @Configuration ] examples

Spring Java Configuration (i.e. JavaConfig) provides a pure-Java means of configuring the Spring IoC container. This is gaining popularity as it gives complete control over instantiation and dependency injection. gives type safety & compile-time check supports refactorable configuration & supported by IDEs Here are some industrial strength wiring examples. #1,

Read more ›

Posted in Spring Basics Tutorial
Page 1 of 41234

800+ Interview Q&As with lots of diagrams & code ♥Free | ♦FAQs | Hover/Slide for full text

open all | close all

200+ Java Interview FAQs – Quick Prep

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

80+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all