Home » Tag Archives: Spring (page 22)

Tag Archives: Spring

Spring MVC: Resources

spring-interview-questions-answers

One of the most frequent questions which I receive from my blog readers is how to use css and javascript files in application with Spring MVC. So it’s a good opportunity to write an article about usage of resources in Spring MVC. As usually I will use java based configuration approach. In a nowadays it’s hard to imagine web-application which ...

Read More »

Spring Data REST in Action

spring-interview-questions-answers

What is spring-data-rest? spring-data-rest, a recent addition to the spring-data project, is a framework that helps you expose your entities directly as RESTful webservice endpoints. Unlike rails, grails or roo it does not generate any code achieving this goal. spring data-rest supports JPA, MongoDB, JSR-303 validation, HAL and many more. It is really innovative and lets you setup your RESTful ...

Read More »

Unit Testing of Spring MVC Controllers: REST API

spring-interview-questions-answers

Spring MVC provides an easy way to create REST APIs. However, writing comprehensive and fast unit tests for these APIs has been troublesome. The release of the Spring MVC Test framework gave us the possibility to write unit tests which are readable, comprehensive and fast. This blog post describes how we can write unit tests for a REST API by ...

Read More »

Spring MVC: REST application with CNVR vol. 3

spring-interview-questions-answers

This is a final, third part of Spring MVC REST tutorial with CNVR. Here I will demonstrate how all that stuff works, which I have developed within first two parts. Here will be four sections for each type of CRUD operations: CREATE, READ, UPDATE, DELETE. As a pre-requirement you need to install any REST client for a working with a ...

Read More »

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 »
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