Home » Tag Archives: Spring (page 42)

Tag Archives: Spring

Spring Profiles in XML Config Files

spring-interview-questions-answers

My last blog was very simple as it covered my painless upgrade from Spring 3.0.x to Spring 3.1.x and I finished by mentioning that you can upgrade your Spring schemas to 3.1 to allow you to take advantage of Spring’s newest features. In today’s blog, I’m going to cover one of the coolest of these features: Spring profiles. But, before ...

Read More »

Spring Security Implementing Custom UserDetails with Hibernate

spring-security-logo

Most of the time, we will want to configure our own security access roles in web applications. This is easily achieved in Spring Security. In this article we will see the most simple way to do this. First of all we will need the following tables in the database: CREATE TABLE IF NOT EXISTS `mydb`.`security_role` ( `id` INT(11) NOT NULL ...

Read More »

Resolve circular dependency in Spring Autowiring

spring-interview-questions-answers

I would consider this post as best practice for using Spring in enterprise application development. When writing enterprise web application using Spring, the amount of services in the service layer, will probably grow. Each service in the service layer will probably consume other services, which will be injected via @Autowire . The problem: When services number start growing, a circular ...

Read More »

Spring Integration with Gateways

spring-interview-questions-answers

This is the second article of the series on Spring Integration. This article builds on top of the first article where we introduced Spring Integration. Context setting In the first article, we created a simple java application where A message was sent over a channel, It was intercepted by a service i.e. POJO and modified. It was then sent over ...

Read More »

Introducing Spring Integration

spring-interview-questions-answers

In this article we introduce Spring Integration. If you have not worked with Spring Integration before, it might help to brush up on Enterprise Integration Patterns by Gregor Hohpe. Also I will recommend this excellent introductory article by Josh Long. Context setting In a nutshell, Enterprise Integration Patterns is all about how to get two application (possibly on different technology ...

Read More »

Spring security 3 Ajax login – accessing protected resources

spring-interview-questions-answers

I have seen some blogs about Spring Security 3 Ajax login, however I could not find any that tackles how to invoke Ajax based login, where a protected resource is being accessed in Ajax by an anonymous user. The problem – The web application enables anonymous access to certain parts and certain parts are protected resources which require the user ...

Read More »

Testing Spring & Hibernate Without XML

spring-interview-questions-answers

I’m very keen on the improvements in Spring 3 that eventually let you move away from XML into plain Java configuration with proper support from IDE and compiler. It doesn’t change the fact that Spring is a huge suite and it sometimes finding the thing you need can take a while. XML-free unit tests around Hibernate are one such thing. ...

Read More »

Spring Profile pattern example

spring-interview-questions-answers

Recently we were introduced with the concept of Spring Profiles. This concept is an easy configuration differentiators for different deployment environments. The straight forward use case (which was presented) was to annotate the relevant classes so Spring would load the appropriate class according to the active profile. However, this approach might not always serve the common use case… often, the ...

Read More »

Handling Form Validation with Spring 3 MVC

spring-interview-questions-answers

This article is a part of a series on Spring 3. The earlier articles of this series were Hello World with Spring 3 MVC and Handling Forms with Spring 3 MVC. Now lets dig a bit deeper into Spring. In this article we will learn to validate data that you have got from the forms. Let’s look at the task of validation ...

Read More »

Handling Forms with Spring 3 MVC

spring-interview-questions-answers

This article is a part of a series of articles written about Spring 3. The previous article of this series is available here. In this article we take another baby step towards Spring MVC. [Aside: A pdf by the originator of the term MVC.] Building from the previous article, let’s add code necessary to add “Contacts” to the application. First ...

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.