Home » Tag Archives: Spring (page 14)

Tag Archives: Spring

Spring 4: @DateTimeFormat with Java 8 Date-Time API

java-logo

@DateTimeFormat annotation that was introduced in Spring 3.0 as a part of Formatter SPI can be used to to parse and print localized field values in web applications. In Spring 4.0, @DateTimeFormat annotation can be used with Java 8 Date-Time API (java.time) out-of-the-box, without extra effort. In Spring, field formatting can be configured by field type or annotation. To bind ...

Read More »

Spring Integration Java DSL sample

spring-interview-questions-answers

A new Java based DSL has now been introduced for Spring Integration which makes it possible to define the Spring Integration message flows using pure java based configuration instead of using the Spring XML based configuration. I tried the DSL for a sample Integration flow that I have – I call it the Rube Goldberg flow, for it follows a ...

Read More »

Rocking with mongodb on spring boot

mongodb-logo

I’m a fan of Spring Boot and here’s my mongodb example project on Spring Boot. Most of the mongodb example projects are so basic that you won’t go far with them. You can search for plain Spring Data examples but they can get much complex than you’d like. So here’s mine. Here’s the pom I’ll use.         ...

Read More »

Implementing correlation ids in Spring Boot (for distributed tracing in SOA/microservices)

spring-interview-questions-answers

After attending Sam Newman’s microservice talks at Geecon last week I started to think more about what is most likely an essential feature of service-oriented / microservice platforms for monitoring, reporting and diagnostics: correlation ids. Correlation ids allow distributed tracing within complex service oriented platforms, where a single request into the application can often be dealt with by multiple downstream ...

Read More »

Writing Clean Tests – New Considered Harmful

java-interview-questions-answers

It is pretty hard to figure out a good definition for clean code because everyone of us has our own definition for the word clean. However, there is one definition which seems to be universal: Clean code is easy to read. This might come as a surprise to some of you, but I think that this definition applies to test ...

Read More »

Spring Rest Controller with angularjs resource

spring-interview-questions-answers

Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to document a configuration that worked well for me. The controller is run of the mill, it supports CRUD operations on a Hotel entity and supports the following methods:           POST ...

Read More »

Adding C3PO Connection Pooling in Spring JDBC

spring-interview-questions-answers

Connection pooling is an operation in which a system pre-initializes the connections to be used in the future. This is done since creating connections at the time of use is an expensive operation. In this post we will learn how we can create C3P0 connection pooling in Spring JDBC (somebody is not using hibernate).             ...

Read More »

Spring Integration 4.0: A complete XML-free example

spring-interview-questions-answers

1. Introduction Spring Integration 4.0 is finally here, and this release comes with very nice features. The one covered in this article is the possibility to configure an integration flow without using XML at all. Those people that don’t like XML will be able to develop an integration application with just using JavaConfig. This article is divided in the following ...

Read More »

Spring Java Configuration: Session timeout

spring-interview-questions-answers

We live in a nice time, when you can develop a Spring application using java based configuration. No redundant XML code any more, just pure java code. In this article I want to discuss a popular topic about session management in Spring applications. If to be more precise I’m going to talk about a session timeout in java configuration style. ...

Read More »

Tracking Exceptions – Part 6 – Building an Executable Jar

apache-maven-logo

If you’ve read the previous five blogs in this series, you’ll know that I’ve been building a Spring application that runs periodically to check a whole bunch of error logs for exceptions and then email you the results. Having written the code and the tests, and being fairly certain it’ll work the next and final step is to package the ...

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.