Let's assume that we have implemented a Spring powered application, and secured it by using the method security expressions of Spring Security. Our next task is to implement a scheduled job which uses the secured methods. To be more specific, we have to implement a scheduled job which obtains a message from our service class […] Read More about Spring From the Trenches: Invoking a Secured Method From a Scheduled Job
Category: Programming (27 / 37)
Adding Social Sign In to a Spring MVC Web Application: Unit Testing
Spring Social 1.0 has a spring-social-test module which provides support for testing Connect implementations and API bindings. This module was removed from Spring Social 1.1.0, and it was replaced with the Spring MVC Test framework. The problem is that there is practically no information about writing unit tests for an application which uses Spring Social […] Read More about Adding Social Sign In to a Spring MVC Web Application: Unit Testing
Turning Assertions Into a Domain-Specific Language
Assertions are an essential part of our unit tests. And yet, it so easy to neglect them. That is a shame because if we overlook the importance of assertions, the assert section of our tests becomes long and messy. Sadly, most tests which I have seen (and written) suffer from this problem. This blog post […] Read More about Turning Assertions Into a Domain-Specific Language
Adding Social Sign In to a Spring MVC Web Application: Registration and Login
The first part of this tutorial described how we can configure Spring Social 1.1.0 and Spring Security 3.2.0 but it left two very important questions unanswered. These questions are: How can a user create a new user account? How can a user log in? It is time to get our hands dirty and answer to […] Read More about Adding Social Sign In to a Spring MVC Web Application: Registration and Login
Adding Social Sign In to a Spring MVC Web Application: Configuration
In the good old days users logged in by using the combination of username and password. Although nowadays some people still prefer the traditional way, a growing number of users want to sign in by using their social media accounts. This is a what makes Spring Social (and its sub projects) an useful addition to […] Read More about Adding Social Sign In to a Spring MVC Web Application: Configuration
From Top to Bottom - TDD for Web Applications
I am a "testing fanatic" but I don’t understand test-driven development. Or so I thought. I have read a few books and numerous blog posts about it, and all of them have one major problem: The examples are always too simple. Those examples might be helpful if you write simple text editors or calculators for […] Read More about From Top to Bottom - TDD for Web Applications