Home » Tag Archives: Spring (page 22)

Tag Archives: Spring

Exploring Spring Controller with JSTL view

spring-interview-questions-answers

Let’s improve our previous Spring JDBC application with some more exploration on Spring MVC’s Controller development. I will show another exercise of writing a new Controller that processes a HTML form and use JSTL tags in JSP view pages. To enable JSTL in Spring MVC application, you would need to add the following to the WebAppConfig config class. Let’s move ...

Read More »

Aspect Oriented Programming with Spring

spring-interview-questions-answers

Introduction In an ideal Object Oriented System, we would want to design each object to perform one specific task. However apart from performing its main task the objects also performs passive task like logging, transactions, security, caching etc. These passive activities which are necessary but not part of business logic are called “Cross Cutting Concerns“. (Cross Cutting Concerns == Commonly ...

Read More »

Getting started with Spring JDBC in a web application

spring-interview-questions-answers

I have shown you how to setup a basic Spring 3 MVC web application in my previous article. Reusing that project setup as template, I will show you how to enhance it to work with JDBC. With this you can store and retrieve data from database. We will add a new controller and a data service through Spring so you ...

Read More »

Getting started with annotation based Spring MVC web application

spring-interview-questions-answers

Here is a minimal way to get a Spring 3 MVC project started with Maven. First create spring-web-annotation/pom.xml file and include the Spring dependency:               <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>spring-web-annotation</groupId> <artifactId>spring-web-annotation</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>3.2.4.RELEASE</version> </dependency> </dependencies> </project> Now ...

Read More »

Light-weight, open-source integration: Apache Camel or Spring Integration?

apache-camel-logo

First of all, for full disclosure, for the last 1.5 years, I’ve been working as a consultant for FuseSource (now Red Hat) supporting SOA and Integration projects for large and small companies in diverse verticals from retail, shipping, banking/finance, health, etc etc. My specialty has been architecting solutions with high scalability and throughput demands using some of the best open-source ...

Read More »

Spring-injected Beans in JPA EntityListeners

spring-interview-questions-answers

In Database Encryption Using JPA Listeners I discussed transparent encryption using a JPA EntityListener. This approach was transparent in the sense that the JPA Entity was (nearly) entirely unaware that encryption was occurring and the JPA EntityListener itself was unaware of the details. There was one big problem. EJB3 can inject resources into an EntityListener. Spring cannot. (N.B., I am ...

Read More »

Spring 4 Conditional

spring-interview-questions-answers

Spring 4 is introducing a new feature called Conditional – an annotation targeted towards Spring components which generate beans and vetos the generation of these beans, in essence it provides a way to conditionally generate beans. Consider a simple example: I have a service called “CustomerService”, with two implementations of this service, say “CustomerService1″ and “CustomerService2″. Based on the presence ...

Read More »

Injecting Spring beans into non-managed objects

spring-interview-questions-answers

Advantages coming from dependency injection can be addicting. It’s a lot easier to configure application structure using injections than doing all resolutions manually. It’s hard to resign from it when we have some non-managed classes that are instantiated outside of the container – for example being part of other frameworks like Vaadin UI components or JPA entities. The latter are ...

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