Home » Tag Archives: Spring (page 25)

Tag Archives: Spring

Spring MVC: REST application with CNVR vol. 2

spring-interview-questions-answers

In the previous post I have made a fast overview of the setting up environment for Spring MVC REST project with CNVR. In this part I can focus directly on a controller and on demonstration of a REST service. As usually I’m going to make a short introduction and after that I will go through the controller methods and explain ...

Read More »

Spring MVC – @RequestBody and @ResponseBody demystified

spring-interview-questions-answers

In this post i want to dig into spring mvc a little, revealing what happens behind the scenes when a request is converted to your parameter object and vice versa. Before we start, i want to explain the purpose of these annotations. What are @RequestBody and @ResponseBody for? They are annotations of the spring mvc framework and can be used ...

Read More »

Spring MVC: REST application with CNVR vol. 1

spring-interview-questions-answers

Not so long time ago I have read an article written by Paul Chapman about Content Negotiating View Resolver (CNVR). That post on a Spring Framework Blog inspired me to investigate this framework’s area. As a result I have developed a sample REST application based on Spring MVC with CNVR. The application demonstrates a basic flow of a REST service ...

Read More »

Getting Started With Spring’s MVC Test Framework – Part 2

spring-interview-questions-answers

The first blog in this mini-series introduced the Spring MVC Test Framework and demonstrated its use in unit testing Spring MVC Controller classes as controllers rather then as POJOs. It’s now time to talk about using the framework for integration testing. By ‘integration testing’ I mean loading the Spring context into the test environment so that the controller can work with ...

Read More »

Spring @Bean and PropertyPlaceHolderConfigurer

spring-interview-questions-answers

I was recently stumped by what I thought was going to be a fairly straightforward implementation – Consider the following Spring Java based bean definition file ( @Configuration):                 package root; ... @Configuration @PropertySource("classpath:root/test.props") public class SampleConfig { @Value("${test.prop}") private String attr; @Bean public SampleService sampleService() { return new SampleService(attr); } } Here ...

Read More »

Spring Data JPA Tutorial Part One: Configuration

spring-data-logo

Spring Data JPA is a project which aims both to simplify the creation of JPA based repositories and to reduce the amount of code needed to communicate with a database. I have been using it for a while at my work and in my personal hobby projects and it has indeed make things a lot more simpler and cleaner. Now ...

Read More »

Testing Web-based Spring Applications in 2013 (Part One)

spring-interview-questions-answers

Testing Web-based Spring Applications in 2013 (Part One) A fellow LJCer and TDD/BDD advocate has recently started developing an application using the ever-popular Spring stack, and he asked my advice on how best to implement a Test-driven methodology within this context. I started typing an email back in response, but then it suddenly occurred to me that this might be useful for ...

Read More »

Getting Started With Spring’s MVC Test Framework – Part 1

spring-interview-questions-answers

Newly promoted to the main Spring framework is the Spring MVC Test Framework, which the Guys at Spring claim is a “first class JUnit support for testing client and server side Spring MVC code through a fluent API”1. In this and my next blog, I’m going to take a look at Spring’s MVC Test Framework and apply it to some ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close