Home » Tag Archives: Spring (page 20)

Tag Archives: Spring

Spring Transactions Visibility

spring-interview-questions-answers

Spring, on initializing application context, creates proxies when it comes across classes marked with @Transactional. @Transactional can be applied at class level or method level. Applying it at class level means all the public methods defined in the class are transactional. The kind of proxy Spring creates i.e. Jdk Proxy or CGLIB proxy, depends on the class in which the ...

Read More »

Exploring Spring Controller with Spring Form Tag

spring-interview-questions-answers

In the past article, I have shown you how to process an plain HTML form with Spring controller. But a more powerful way to process form is to use Spring’s @ModelAttribute and its spring:form tags. I will show you how to get that started here by modifying last article’s project setup. We will simply modify the Comment form and controller ...

Read More »

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 »
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