Home » Tag Archives: Spring (page 14)

Tag Archives: Spring

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 »

Spring test with thymeleaf for views

spring-interview-questions-answers

I am a recent convert to thymeleaf for view templating in Spring based web applications, preferring it over jsp’s. All the arguments that thymeleaf documentation makes on why thymeleaf over jsp holds water and I am definitely sold. One of the big reasons for me, apart from being able to preview the template, is the way the view is rendered ...

Read More »

HOW-TO: Spring Boot and Thymeleaf with Maven

apache-maven-logo

Spring Boot is a great piece of software allowing you to bootstrap Spring application within a few seconds. And it really works. As little configuration as possible to get started. And still possible to change the defaults. Let’s see how easily is to bootstrap Spring MVC with Thymeleaf and Maven and work with it in IntelliJ. Basic setup Spring MVC ...

Read More »

Using jOOQ with Spring: CRUD

jooq-2-logo

jOOQ is a library which helps us to get back 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 example application and generate code from our database. ...

Read More »

Spring Test Context Caching + AspectJ @Transactional + Ehcache pain

aspectj-logo

Are you using AspectJ @Transactionals and Spring? Do you have multiple SessionFactory’s maybe one for an embedded database for unit testing and one for the real database for integration testing? Are you getting one of these exceptions? org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.service.UnknownServiceException: Unknown service requested or java.lang.NullPointerException at net.sf.ehcache.Cache.isKeyInCache(Cache.java:3068) at org.hibernate.cache.ehcache.internal.regions.EhcacheDataRegion.contains(EhcacheDataRegion.java:223) Then you ...

Read More »

Spring-boot and Scala

spring-interview-questions-answers

There is actually nothing very special about writing a Spring-boot web application purely using Scala, it just works! In this blog entry, I will slowly transform a Java based Spring-boot application completely to Scala – the Java based sample is available at this github location – https://github.com/bijukunjummen/spring-boot-mvc-test To start with, I had the option of going with either a maven ...

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