I got to know about JDeodorant– a tool for identifying bad smells in code and helping it to refactor. I got curious and downloaded its Eclipse plugin, I then picked the first bad smell code which Martin Fowler explains in his book: “Refactoring: Improving the design of existing code”. I tried my hand at refactoring a long method by Extract Method refactor move. Here’s the long method:
Gotcha: Migrating from Spring Security 3.2.x to Spring Security 4.x
Here is a simple gotcha to keep in mind while migrating to newer Spring Security version 4.x from Spring Security 3.2.x What’s the problem? The Spring security configuration expressions hasRole(‘role_name’) and hasAuthority(‘role_name’) are no longer the same. The catch is: hasAuthority checks for any role name passed to the expression without prepending ‘ROLE_’ (which is … Read more