Added example for SpringSecurity integration.
Fixed some Java 6 incompatibilities.