The Spring Framework is a mature, powerful and highly flexible framework focused on building web applications in Java.
Spring Framework是一个成熟、强大和高度灵活的框架,专注于在Java中构建Web应用程序。
One of the core benefits of Spring is that it takes care of most of the low-level aspects of building the application to allow us to actually focus on features and business logic.
Spring的核心优势之一是它处理了构建应用程序的大部分低层次问题,使我们能够真正专注于功能和业务逻辑。
Another strong point is that, while the framework is quite mature and well-established, it’s very actively maintained and has a thriving dev community. This makes it quite up to date and aligned with the Java ecosystem right now.
另一个强项是,虽然该框架已经相当成熟和完善,但它的维护非常积极,并且有一个繁荣的开发社区。这使得它与时俱进,与目前的Java生态系统保持一致。
Of course, there’s a lot to learn to work well with Spring.
当然,要想很好地与Spring合作,还有很多东西需要学习。
Let’s get started.
让我们开始吧。
Basics of Spring
Spring的基础知识
We’ll start with some core aspects of the framework first:
我们先从该框架的一些核心方面开始。
-
Why Choose Spring as Your Java Framework? -
Spring Bean Annotations -
Spring Profiles (popular) -
Properties with Spring (popular) -
Project Configuration with Spring -
Spring Exceptions (Series) -
The Spring @Qualifier Annotation -
Understanding getBean() in Spring -
What is a Spring Bean? -
@Component vs @Repository and @Service in Spring -
Spring Core Annotations -
XML-Based Injection in Spring -
Using Spring @Value with Defaults -
A Quick Guide to Spring @Value (popular) -
Intro to Inversion of Control and Dependency Injection with Spring -
Constructor Dependency Injection in Spring -
Wiring in Spring: @Autowired, @Resource and @Inject -
Guide to Spring @Autowired (popular) -
Quick Guide to Spring Bean Scopes
Spring on the Web
网络上的Spring
The Spring MVC framework is the foundation of building web applications with Spring.
Spring MVC框架是用Spring构建Web应用的基础。
It powers a wide range of web applications, from traditional MVC-style applications, all the way to stateless REST APIs.
它为广泛的网络应用提供支持,从传统的MVC风格的应用,一直到无状态的REST APIs。
Let’s start with some of the basics – the common ground between all of these styles of web applications:
让我们从一些基础知识开始–所有这些风格的网络应用之间的共同点。
And then, the basics of building a traditional, MVC-style web application:
然后,构建一个传统的、MVC风格的Web应用程序的基础知识。
And, if you’d like to explore the Spring MVC framework more in-depth, here’s a more comprehensive guide to do that.
而且,如果你想更深入地探索Spring MVC框架,这里有一个更全面的指南,以做到这一点。
Finally, let’s explore the RESTful support in Spring MVC:
最后,让我们来探索Spring MVC中的RESTful支持。
-
Bootstrapping a Web Application -
Building a REST API -
Securing a REST API -
Basic and Digest Authentication for a REST API -
REST Pagination -
Entity To DTO Conversion for a Spring REST API -
Spring’s RequestBody and ResponseBody Annotations (popular) -
Error Handling for REST with Spring (popular) -
Max-HTTP-Header-Size in Spring Boot 2
And, if you’d like to further explore building a REST API with Spring, you can go through the more full-fledged series of articles here.
而且,如果你想进一步探索用Spring构建REST API,你可以通过这里有更全面的系列文章。
Spring Persistence – SQL
Spring Persistence – SQL
Spring supports most persistence solutions out there:
Spring支持目前大多数的持久化解决方案。
Spring Persistence – No SQL
Spring Persistence – 无SQL
Spring Security
Spring安全
Next, a really strong aspect of the Spring ecosystem – security:
接下来,Spring生态系统的一个真正强大的方面–安全:
-
Security with Spring (Main Series)(popular) -
Spring Security Authentication Tutorial (Series) -
Spring Security Registration (Series and Case Study)