Home » Tag Archives: Spring (page 16)

Tag Archives: Spring

The Builder pattern and the Spring framework

spring-interview-questions-answers

Introduction I like to make use of the builder pattern whenever an object has both mandatory and optional properties. But building objects is usually the Spring framework responsibility, so let’s see how you can employ it using both Java and XML-based Spring configurations. A Builder example Let’s start from the following Builder class.   public final class Configuration<T extends DataSource> ...

Read More »

SpringMVC4 + Spring Data JPA + SpringSecurity configuration using JavaConfig

spring-interview-questions-answers

In this article we will see how to configure and integrate SpringMVC4, Spring Data JPA with Hibernate and SpringSecurity using JavaConfig. 1. First let’s configure all the necessary dependencies in pom.xml                 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.sivalabs</groupId> <artifactId>spring-javaconfig</artifactId> <version>1.0</version> <packaging>war</packaging> <name>SpringApp JavaConfig Demo</name> <properties> <java.version>1.7</java.version> <junit.version>4.11</junit.version> <slf4j.version>1.7.5</slf4j.version> <logback.version>1.0.13</logback.version> <spring.version>4.0.0.RELEASE</spring.version> <spring-data-jpa.version>1.4.1.RELEASE</spring-data-jpa.version> <spring-security.version>3.2.0.RELEASE</spring-security.version> ...

Read More »

Tracking Exceptions With Spring – Part 2 – Delegate Pattern

spring-interview-questions-answers

In my last blog, I started to talk about the need to figure out whether or not your application is misbehaving in it’s production environment. I said that one method of monitoring your application is by checking its log files for exceptions and taking appropriate action if one is found. Obviously, log files can take up hundreds of megabytes of ...

Read More »

Websockets with Spring 4

spring-interview-questions-answers

I am throwing the entire kitchen sink into a small web application that I am developing as part of this post – Spring Boot, Spring Integration, RabbitMQ and finally the topic of the post, the Websocket support in Spring MVC with Spring 4. Real-time quake listing application The final app will list the earthquake occurrences around the world and is ...

Read More »

Thymeleaf integration with Spring (Part 2)

spring-interview-questions-answers

1. Introduction This is the second part of the Thymeleaf integration with Spring tutorial. You can read the first part here, where you will learn how to configure this project. As explained at the beginning of the first part of this tutorial, the web application will send two types of requests:         Insert a new guest: Sends ...

Read More »

Building Java Web Application Using Hibernate With Spring

jboss-hibernate-logo

This post will show how to create a Student Enrollment Application using MYSQL DB with Hibernate ORM in a Spring environment. This is a simple application that aims to collect the input details from the user during signup, save the details in the MYSQL DB and authenticate the same during login. 1. Create Java Web Application Project using Maven Template ...

Read More »

Tracking Application Exceptions With Spring

spring-interview-questions-answers

A few weeks ago a colleague asked me to spend a week doing a support role as he needed cover whilst he took a well earned holiday and he couldn’t find anyone else. As I’d just completed a particularly complex coding project and was feeling a little burnt out, I said ‘yes'; after all the change would do me good. ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.