Home » Tag Archives: Spring (page 38)

Tag Archives: Spring

Getting rid of null parameters with a simple spring aspect

aspectj-logo

What is the most hated and at the same time the most popular exception in the world? I bet it’s the NullPointerException. NullPointerException can mean anything, from simple “ups, I didn’t think that can be null” to hours and days of debugging of third-party libraries (try using Dozer for complicated transformations, I dare you). The funny thing is, it’s trivial ...

Read More »

Simple Workflow Engine With Spring

spring-interview-questions-answers

Few months ago, during working on one of the company project, we had need to developed REST services which is used for sending an email depending on data sent by client application. During developing this service we decide to create simple workflow engine which will be charged for sending an email, but also this engine can be used for any ...

Read More »

Embedding HSQLDB server instance in Spring

spring-interview-questions-answers

I was using XAMPP happily for development until I had to host it somewhere accessible via the Internet for the client to test and use. I have a VPS that only has 384 RAM, and needing to find a way fast, I decided to install XAMPP into the VPS. Because of the low RAM, when MySQL was running, Tomcat failed ...

Read More »

Spring 3.1, Cloud Foundry and Local Development

spring-interview-questions-answers

This post will help you build a Spring 3.1 web application using MongoDB on Cloud Foundry. In addition to pushing to Cloud Foundry, you will also be able to develop in your local environment with a MongoDB instance. Goals The goals for this blog posting will be to build the application locally, then publish to your local Cloud Foundry instance. ...

Read More »

Spring MVC REST Calls With Ajax

spring-interview-questions-answers

This post provides a simple example of REST calls to a Spring MVC web application. It is based on the Serving Static Resources With Spring MVC and Fetching JSON With Ajax In Spring MVC Context example. The code is  available on GitHub in the Spring-REST-With-Ajax directory. Main Page Our main page contains four buttons linked to Javascript functions performing Ajax calls:       ...

Read More »

Spring 3.1 – Loading Properties For XML Configuration From Database

spring-interview-questions-answers

Spring makes it easy to inject values obtained from properties files via its PropertyPlaceholderConfigurer and (pre-Spring 3.1) PropertySourcesPlaceholderConfigurer (Spring 3.1). These classes implement the BeanFactoryPostProcessor interface, which enables them to manipulate the values within the Spring XML configuration file before the beans are initialized. So if you specify ${jdbc.driverClassName} to be set to the property ‘driverClassName’, this variable will be ...

Read More »

Spring MVC Error Handling Example

spring-interview-questions-answers

This post describes the different techniques to perform error handling in Spring MVC 3. The code is available on GitHub in the Spring-MVC-Error-Handling directory. It is based on the Spring MVC With Annotations examples. Handling Exceptions Before Spring 3 Before Spring 3, exceptions were handled with HandlerExceptionResolvers. This interface defines a single method:       ModelAndView resolveException( HttpServletRequest request, HttpServletResponse response, Object ...

Read More »

Coherence Event Processing by using Map Trigger Feature

oracle-coherence-logo

This article shows how to process Coherence events by using Map Triggers. Basically, Distributed Data Management in Oracle Coherence is suggested to look over basic configuration and implementation of Oracle Coherence API Map Triggers are one of the most important features of Oracle Coherence to provide a highly customized cache management system. MapTrigger represents a functional agent that allows to ...

Read More »

Spring: Setting Logging Dependencies

spring-interview-questions-answers

This post describes how to set-up logging dependencies in Spring. It is based on information available in a post by Dave Syer’s. A reminder on Java logging frameworks is available here. The code example is available at GitHub in the Spring-Logging-Dependencies directory. Spring uses Jakarta Commons Logging API (JCL). Unfortunately, many people do not like its runtime discovery algorithm. We can disactivate it and ...

Read More »

Method Parameter Names and Spring

spring-interview-questions-answers

Continuing on the previous blog entry about Constructor and method parameters and Java not retaining the parameter names at runtime – the previous entry was about constructor not retaining the parameter names and the implication of this for Contructor injections in Spring, here I will cover a few more scenarios where parameter names not being retained has implications with Spring: 1. ...

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.