Home » Tag Archives: Spring (page 21)

Tag Archives: Spring

Thymeleaf template layouts in Spring MVC application with no extensions

spring-interview-questions-answers

After some years with JSP/JSTL and Apache Tiles I started discovering Thymeleaf for my Spring MVC applications. Thymeleaf is a really great view engine and it simplifies and speeds up the development despite that lack of good IntelliJ (vote here: http://youtrack.jetbrains.com/issue/IDEABKL-6713) support at the moment (there is an Eclipse plugin though). While learning how to use Thymeleaf I investigated different ...

Read More »

Getting Started with method security in Grails using Spring Security

grails-logo

This blog post will be about implementing method level security with security expressions in Grails using the Spring Security plugins. I assume you have some basic understanding of the Grails Spring Security Core plugin. Roles aren’t enough. When using the Spring Security Core plugin you typically start to configure which roles are required for accessing certain URLs. This configuration can ...

Read More »

Grails: Calling bean methods in Spring Security expressions

grails-logo

Some days ago while working on a Grails application I was in a situation where a wanted to call a bean method from a Spring security SPEL expression. I was using the @PreAuthorize annotation from the Spring Security ACL plugin and wanted to do something like this:               @PreAuthorize("myService.canAccessUserProfile(#profileId)") public Profile getUserProfile(long profileId) {   ... } @PreAuthorize takes ...

Read More »

@ControllerAdvice improvements in Spring 4

spring-interview-questions-answers

Among many new features in Spring 4 I found @ControllerAdvice improvements. @ControllerAdvice is a specialization of a @Component that is used to define @ExceptionHandler, @InitBinder, and @ModelAttribute methods that apply to all @RequestMapping methods. Prior to Spring 4, @ControllerAdvice assisted all controllers in the same Dispatcher Servlet. With Spring 4 it has changed. As of Spring 4 @ControllerAdvice may be ...

Read More »

Type Conversion in Spring

spring-interview-questions-answers

Here are few straight cases where we need type conversion: Case #1. To help simplifying bean configurations, Spring supports conversion of property values to and from text values. Each property editor is designed for a property of certain type only. And to put them in use, we have to register them with Spring container. Case #2. Also when using Spring ...

Read More »

Spring: Make your java-based configuration more elegant

spring-interview-questions-answers

Hi everyone, I haven’t written new articles a long period of time. A lot of materials were accumulated which need to be posted in my blog in nearest future. But now I want to talk about Spring MVC application configurations. If to be more precisely, I want to talk about java based Spring configurations. Despite that Spring java based configuration ...

Read More »

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