Home » Tag Archives: Spring (page 40)

Tag Archives: Spring

Spring Shell Project Released

news-logo

Spring Source released Spring Shell yesterday. Spring Shell is an interactive shell that can be easily extended with commands using a Spring based programming model. It has been extracted from the Spring Roo project by removing the OSGi dependencies and turned into a standalone project. This allows for an easier adoption by those who wish to use only interactive shell ...

Read More »

Redis pub/sub using Spring

spring-interview-questions-answers

Continuing to discover the powerful set of Redis features, the one worth mentioning about is out of the box support of pub/sub messaging. Pub/Sub messaging is essential part of many software architectures. Some software systems demand from messaging solution to provide high-performance, scalability, queues persistence and durability, fail-over support, transactions, and many more nice-to-have features, which in Java world mostly ...

Read More »

Enhancing Spring Test Framework with beforeClass and afterClass setup

spring-interview-questions-answers

How to allow instance methods to run as JUnit BeforeClass behavior JUnit allows you to setup methods on the class level once before and after all tests methods invocation. However, by design on purpose that they restrict this to only static methods using @BeforeClass and @AfterClass annotations. For example this simple demo shows the typical Junit setup: package deng.junitdemo; import ...

Read More »

Spring 3.1: Caching and EhCache

spring-interview-questions-answers

If you look around the web for examples of using Spring 3.1’s built in caching then you’ll usually bump into Spring’s SimpleCacheManager, which the Guys at Spring say is “Useful for testing or simple caching declarations”. I actually prefer to think of SimpleCacheManager as lightweight rather than simple; useful in those situations where you want a small in memory cache ...

Read More »

Spring Security using API Authentication

spring-security-logo

Background While there are many blog posts that detail how to use Spring Security, I often still find it challenging to configure when a problem domain lies outside of the standard LDAP or database authentication. In this post, I’ll describe some simple customizations to Spring Security that enable it to be used with a REST-based API call. Specifically, the use ...

Read More »

Spring Testing Support and Context caching

spring-interview-questions-answers

Spring provides a comprehensive support for unit and integration testing – through annotations to load up a Spring application context, integrate with unit testing frameworks like JUnit and TestNG. Since loading up a large application context for every test takes time, Spring intelligently caches the application context for a test suite – typically when we execute tests for a project, ...

Read More »

Spring MVC 3 Template and Apache Tiles

spring-interview-questions-answers

An efficient design consideration for any web application is the use of a template engine (or tool), and with Spring’s “pluggable” nature, it is indeed much more easier to integrate template mechanisms such as Apache Tiles. In this simple post, I will give you a brief intro and basics of using Tiles as a Template engine for your Web Application! ...

Read More »

Spring 3.1 Caching and Config

spring-interview-questions-answers

I’ve recently being blogging about Spring 3.1 and its new caching annotations @Cacheable and @CacheEvict. As with all Spring features you need to do a certain amount of setup and, as usual, this is done with Spring’s XML configuration file. In the case of caching, turning on @Cacheable and @CacheEvict couldn’t be simpler as all you need to do is ...

Read More »

“Introduction to Spring” Tutorial Series

spring-interview-questions-answers

Hello all, I am glad to present you this “Introduction to Spring” tutorial series! It is a series of articles originally written by our JCG partner Michal Vrtiak at the vrtoonjava blog. A timesheet management application is gradually created in this series and each tutorial builds on top of the previous one. All main aspects of a web application are ...

Read More »

Spring – Adding AOP support

aspectj-logo

I heard a story about one senior (and quite highly paid) softwaree engineer. He was given task to log every method in every controller in project he was working on. Engineer rewrote all controller methods, so from code like this: @RequestMapping(method = RequestMethod.GET) public String showEmployees(Model model) { List<Employee> employees = employeeDao.list(); model.addAttribute('employees', employees); return 'employees/list'; } he made following ...

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.