Blog Archives

Spring MVC Web Application with JPA, Hibernate & MySQL

Controller –> Service Layer –> DAO Layer –> JPA/Hibernate –> MySQL Database Step 1: The pom.xml with JSTL, Spring MVC, JPA, and Hibernate libraries are included as well.

Define the model class Account.java Step 2: Define the Account.java with 3 fields & getters/setters in the package “com.mytutorial.model”. This has

Read more ›

Posted in JPA-Hibernate-Spring Tutorial

Spring MVC RESTful with JPA, Hibernate & MySQL database beginner in 13 steps

This tutorial combines both 1) Spring 4 MVC RESTful Web Service Beginner Tutorial step by step, which focuses on the RSTful web service and 2) JPA with Hibernate & MySQL database tutorial step by step, which focuses on JPA and Hibernate. Controller –> Service Layer –> DAO Layer –> JPA/Hibernate

Read more ›

Posted in JPA-Hibernate-Spring Tutorial

JPA with Hibernate & MySQL database tutorial step by step

This assumes that MySQL database is setup as per the tutorial Getting started with MySQL database beginner tutorial and ⏯ MySQL database beginner video tutorial. Step 1: Create a maven based Java project from a command-line.

Step 2: Import the project into Eclipse as “File” –> “Import” –> “Existing

Read more ›

Posted in Hibernate Tutorial, JPA Tutorial

04: 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-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
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. You can go to “https://spring.io/guides/” for various guides such…...

Members Only Content

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

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
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-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
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-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
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
Page 1 of 41234

800+ Interview Q&As – ♥ Free | ♦ FAQs

open all | close all

Pressed for time? 200+ Quick Prep

open all | close all

16 Technical Key Areas to be a top-notch

open all | close all

100+ 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