Spring Security Java Config Preview: Readability
In this post, I will discuss how to make your Spring Security Java configuration more readable. The post is intended to elaborate on a point from Spring Security Java Config Preview: Web Security where I stated:
By formatting our Java configuration code it is much easier to read. It can be read similar to the XML namespace equivalent where "and()" represents optionally closing an XML element.
Indentation
The indentation of Spring Security's Java configuration really impacts its readability. In general, indentation like a bullet list should be preferred.
For a more concrete example, take a…