Data Access With Spring

Spring provides many supportive tools for data management. For example, when manipulating databases you might want to rely on transaction management. When you annotate a method with @Transactional a transaction must be present before method-execution. To match this requirement, Spring proxies your class with a transaction interceptor that uses a transaction manager to administer the…

Spring AOP

Aspect-orientated programming is used to address cross-cutting concerns that lead to code scattering (boiler plate code by spreading the same concern across your application) and/or code tangling (neglection of single responsibility by coupling different concers). Examples for cross-cutting concerns are generic functionalities, such as logging or security checks before method execution. Spring offers of AspectJ…

Integration Tests With Spring

Unit tests of your project created with Spring, you should not depend on Spring, as unit tests must not depend on external dependencies and Spring is an external dependency. These dependencies should be stubbed or mocked instead. However, Spring provides support for integration testing with configurations, profiles and databases. These support-classes are located in spring-test.jar…

Spring Basics

Disclaimer You are not reading a complete reference, the posts are more about a simple understanding and getting something to work with. Most examples use Java config rather than XML or annotation-based configuration. What is Spring Spring is a Framework a Container open source The framework consists of many subprojects to simplify working with lower-level…