Home » Tag Archives: Spring (page 31)

Tag Archives: Spring

When Maven Dependency Plugin Lies

apache-maven-logo

Problem: We had an integration test which creates a spring ClassPathXmlApplicationContext and while doing so the test blew up with a NoSuchMethodError. It turned out that we had conflicting versions of dependencies on Spring artifacts. This in itself is not an unusual problem – such problems are addressed with the maven dependency plugin using the verbose option. However, what do you do ...

Read More »

Spring MVC Form Tutorial

spring-interview-questions-answers

This tutorial will show how to handle a form submission in Spring MVC. We will define a controller to handle the page load and the form submission. You can grab the code on GitHub. Prerequisites: You should have a working Spring MVC Application. If you do not already have a working Spring MVC application set up, follow this tutorial. For ...

Read More »

Spring: To autowire or not to autowire

spring-interview-questions-answers

Since using Spring 2.5, I switched from the XML-based application context to the annotations. Although I find those very useful and huge time savers, I’ve always had the feeling that I was losing something in term of flexibility. In particular the @Autowired annotation – or the standard @Inject – felt to me like the new “new”, increasing the coupling between ...

Read More »

Spring Social Twitter Setup

spring-interview-questions-answers

In the first part of this series, we looked at how we could consume the StackExchange REST API in order to retrieve its top questions. This second part will focus on setting up the support necessary to interact with the Twitter REST APIs using the Spring Social Twitter project. The end goal is to be able to tweet these questions, ...

Read More »

Drools decision tables with Camel and Spring

jboss-drools-logo

As I’ve shown it in my previous post JBoss Drools are a very useful rules engine. The only problem is that creating the rules in the Rule language might be pretty complicated for a non-technical person. That’s why one can provide an easy way for creating business rules – decision tables created in a spreadsheet! In the following example I ...

Read More »

Spring MVC – Easy REST-Based JSON Services with @ResponseBody

json-logo

Spring 3 makes JSON REST services really easy. This tutorial will show you how in just a few steps. You can grab the code on GitHub. Prerequisites You should have a working Spring MVC Application. If you do not already have a working Spring MVC application set up, follow this tutorial. We will define three REST services: 1) to retrieve a random ...

Read More »

Spring JpaRepository Example (In-Memory)

spring-interview-questions-answers

This post describes a simple Spring JpaRepository example using an in memory HSQL database. The code example is available from GitHub in the Spring-JpaRepository directory. It is based on the Spring-MVC-With-Annotations example and information available here. JPA Repository We implement a dummy bean for this example:       @Entity @AutoProperty public class SomeItem { @Id @GeneratedValue(strategy=GenerationType.AUTO) private long Id; ...

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.