Home » Tag Archives: Spring (page 15)

Tag Archives: Spring

Spring MVC and Thymeleaf: how to acess data from templates

spring-interview-questions-answers

In a typical Spring MVC application, @Controller classes are responsible for preparing a model map with data and selecting a view to be rendered. This model map allows for the complete abstraction of the view technology and, in the case of Thymeleaf, it is transformed into a Thymeleaf VariablesMap object that makes all the defined variables available to expressions executed ...

Read More »

Spring Scala based sample bean configuration

spring-interview-questions-answers

I have been using Spring Scala for a toy project for the last few days and I have to say that it is a fantastic project, it simplifies Spring configuration even further when compared to the already simple configuration purely based on Spring Java Config. Let me demonstrate this by starting with the Cake Pattern based sample here:     ...

Read More »

Load inheritance tree into List by Spring

spring-interview-questions-answers

I noticed interesting Spring feature. One of my colleagues used it for loading whole inheritance tree of Spring beans into list. Missed that when I was studying Spring docs. Let’s have this inheritance tree of Spring beans:             In following snippet is this tree of beans loaded into list with constructor injection: @Component public class ...

Read More »

Spring Integration – Configure web service client timeout

spring-interview-questions-answers

Introduction With the support of Spring Integration, your application can invoke a web service by using an outbound web service gateway. The invocation is handled by this gateway, thus you just need to worry about building the request message and handling the response. However, with this approach it is not obvious how to configure additional options like setting timeouts or ...

Read More »

Using jOOQ with Spring: Sorting and Pagination

jooq-2-logo

JOOQ is a library which helps us to get in control of our SQL. It can generate code from our database and lets us build typesafe database queries by using its fluent API. The earlier parts of this tutorial have taught us how we can configure the application context of our application, generate code from our database, and add CRUD ...

Read More »

Just What Are Spring 3.2 Matrix Variables? – Part 1

spring-interview-questions-answers

Spring 3.2 introduced support for processing something called ‘Matrix Variables’ and probably like most developers, I’ve never heard of them. So, after some research, this blog is my understanding of what they are and what you can do with them. As usual, please feel free to correct me if I’m wrong. When I first read about them a whole bunch ...

Read More »

Tracking Exceptions – Part 5 – Scheduling With Spring

spring-interview-questions-answers

It seems that I’m finally getting close to the end of this series of blogs on Error Tracking using Spring and for those who haven’t read any blogs in the series I’m writing a simple, but almost industrial strength, Spring application that scans for exceptions in log files and then generates a report. From the first blog in the series, ...

Read More »

Using Http Session with Spring based web applications

spring-interview-questions-answers

There are multiple ways to get hold of and use an Http session with a Spring based web application. This is a summarization based on an experience with a recent project. Approach 1 Just inject in HttpSession where it is required.         @Service public class ShoppingCartService { @Autowired private HttpSession httpSession; ... } Though surprising, since 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.