更新时间:2021-06-25 21:13:43
封面
版权信息
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Exploring Spring Concepts
Introducing the Spring Framework
Problems with EJB
Simplifying implementation using POJO
Benefits of the Spring Framework
No need to reinvent the wheel
Ease of unit testing
Reduction in implementing code
Inversion of control and API
Consistency in transaction management
Modular architecture
Up to date with time
Understanding Spring modules
Core Container
Crosscutting concerns
Data Access/Integration
Web
Spring projects
Spring Boot
Spring Data
Spring Batch
Spring Cloud
Spring Security
Spring HATEOAS
Spring's IoC container
What are Spring beans?
Instantiating a Spring container
BeanFactory
ApplicationContext
Spring bean life cycle
New features in the Spring Framework 5.0
Baseline upgrades
Reactive programming support
Core features upgrades
Spring Web MVC upgrades
Spring's new functional web framework – WebFlux
Modularity support
Kotlin language support
Improved testing support
Dropped or deprecated features
Summary
Spring Best Practices and Bean Wiring Configurations
Dependency injection configurations
Types of DI patterns
Constructor-based DI
Advantages of the constructor-based DI
Disadvantages of the constructor-based DI
Setter-based DI
Advantages of the setter-based DI
Disadvantages of the setter-based DI
Field-based DI
Constructor versus setter injection
Configuring the DI with Spring
XML-based configuration
Java-based configuration
Annotation-based configuration
The @Autowired annotation
@Autowired with required = false
The @Primary annotation
The @Qualifier annotation
Automatic bean detection with stereotype annotations
The @ComponentScan annotation
The @Lazy annotation
Spring bean scopes
Performance assessment with different configurations
Lazy loading versus preloading
Singleton versus prototype bean
Spring bean configuration best practices
DI pitfalls
First pitfall
Second pitfall (with AOP)
Tuning Aspect-Oriented Programming
AOP concepts
Limitations of OOP
Code tangling
Code scattering
AOP – problem solver
Spring AOP terminology and concepts
Defining pointcuts
Types of advice
Aspect instantiation models