知識庫 / Series RSS 訂閱

Spring 教程

Series,Spring
HongKong
7
12:15 PM · Dec 06 ,2025
<section class="series-text">
 <p>Spring 框架是一個成熟、強大且高度靈活的框架,專注於使用 Java 構建 Web 應用程序。</p>
 <p>Spring 的核心優勢在於,它處理了構建應用程序的大部分低級方面,使我們能夠真正專注於功能和業務邏輯。</p>
 <p>另一個重要優勢是,儘管框架相當成熟且廣為採用,但它仍然受到積極維護,並且擁有蓬勃發展的開發者社區。這使其與 Java 生態系統保持高度同步。</p>
 <p>當然,要熟練地使用 Spring,還需要學習很多東西。</p>
 <p>讓我們開始吧。</p>
</section>
<section class="series-category baeldung_series_block">
 <div>
  <img src="/file/story/attachments/image/l/e2fb0eae-12f1-4c98-8cfb-5d038d81d76c">
 </div
</section>
<h2>Spring Core Basics</h2>
<div>
  <p>We’ll start with some core aspects of the framework first:</p>
</div>
<ul>
  <li><img src="/file/story/attachments/image/l/2f99f714-b95b-4eec-8d3b-c5642b2d4ad3"> <span> Why Choose Spring as Your Java Framework? <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/126686c5-0825-4726-b4e5-a0226c6d76e1"> <span> Intro to Inversion of Control and Dependency Injection with Spring <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/39f8525d-1a03-4c14-8e5f-189e59dfdc8e"> <span> Constructor Dependency Injection in Spring <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/921033a7-2fad-4696-a5f3-fbc4b5323282"> <span> What Is a Spring Bean? <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/04cb4799-fcf9-42e5-93e8-71c6b7331672"> <span> Quick Guide to Spring Bean Scopes <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/c8819d56-0d20-4c9a-beff-ef21b1dd1632"> <span> Spring Bean Annotations </span></li >
  <li><img src="/file/story/attachments/image/l/8c5e9a39-c39d-4ec2-91a7-fbfacdbc1382"> <span> Guide to Spring @Autowired <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/d40daea6-926c-4759-86a4-1be0cf61a656"> <span> Wiring in Spring: @Autowired, @Resource and @Inject <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/0edcf881-f484-408a-bb60-6b553b35bf15"> <span> The Spring @Qualifier Annotation <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/1461ba29-f63b-4514-8cb4-01079f7cf043"> <span> @Component vs @Repository and @Service in Spring <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/7b7a10df-95d6-4417-aa8f-7d067e370a69"> <span> Properties with Spring and Spring Boot <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/1d409d55-a879-4cdc-9fd1-77485f5c927e"> <span> A Quick Guide to Spring @Value <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/a14cefe9-c126-4482-964c-02aec117ce6b"> <span> Spring Profiles <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/76bde08c-1ba0-4a4c-82b1-2c71d5382834"> <span> The @Scheduled Annotation in Spring <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/ce7e1ffd-abfe-4eaf-8ba5-9af3906f27ac"> <span> Getting the Current ApplicationContext in Spring </span></li >
  <li><img src="/file/story/attachments/image/l/b89b3e88-b710-4a95-8300-6e6e104f8cfe"> <span> Spring YAML Configuration <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/4b87f5fa-022f-40cf-a374-e171a30d92f1"> <span> Working with Virtual Threads in Spring <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/7a5c1e50-e304-4d78-8af0-12a3b6948aed"> <span> Spring Dependency Injection Series <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/74818a2e-6b14-4f85-98da-2f4457f29081"> <span> Spring PostConstruct and PreDestroy Annotations <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/d43a23ab-c5e6-432a-92ed-4eb835e8ffb7"> <span> Spring Core Annotations </span></li >
  <li><img src="/file/story/attachments/image/l/050134fe-34bb-4bf3-a3be-fb78d5799ac2"> <span> Introduction to Spring AOP <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/daf0f99a-6e95-473d-bc0d-57c655416e70"> <span> @Component Annotation <span>(popular)</span> </span></li >
  <li><img src="/file/story/attachments/image/l/d1c46a55-5c16-4aeb-8646-bcc11b832425"> <span> The Spring ApplicationContext <span>(popular)</span> </span></li >
  <li><img src="/𒅬/file/story/attachments/image/l/a79853ec-aff3-467b-820b-db5fbafdcfc6"> <span> Guide To Caching In Spring <span>(popular)</span> </span></li >
</ul>
</section>
<section class="series-category baeldung_series_block">
  <div>
    <img src="/file/story/attachments/image/l/ae239af0-e5f9-4404-b5ac-a9c26e1f72cb">
  </div>
</section>
<section>
  <h2>Spring Boot 基礎</h2>
</section>
<section class="baeldung_series_block">
  <div>
    <p>接下來,我們來探索 Spring Boot 的基礎知識:</p>
  </div>
  <ul>
    <li><img src="/file/story/attachments/image/l/2fb68ff1-c7a8-449c-bdd0-2937f2270157"> <span > Spring Boot 教程 - 使用 Bootstrap 構建一個簡單的應用程序 <span>(熱門)</span> </span></li>
    <li><img src="/file/story/attachments/image/l/4f79e701-c6f6-4dd9-82fe-1f0e87b9e691"> <span > Spring Boot 註解 <span>(熱門)</span> </span></li>
    <li><img src="/file/story/attachments/image/l/84ea2f4a-f077-49f6-92ab-db1eaa15e810"> <span > Spring Boot Starter 介紹 <span>(熱門)</span> </span></li>
    <li><img src="/file/story/attachments/image/l/c5ffb788-3d77-459c-9a90-aba9f7bb66bc"> <span > Spring Boot 學習系列 <span>(熱門)</span> <span>(系列)</span> </span></li>
  </ul>
</section>
<section>
  <h2>Spring MVC</h2>
</section>
<section class="baeldung_series_block">
  <div>
    <img src="/file/story/attachments/image/l/4dbe56e9-ea8d-40b9-9d1e-94d263dda6ed">
    <p>Spring MVC 框架是構建 Spring 應用的基礎。</p>
    <p>讓我們先了解一下構建 MVC 風格 Web 應用的基本內容:</p>
    <ul>
      <li><img src="/file/story/attachments/image/l/efcb756c-e764-4f0f-9e91-95a8ef4a55c6"> <span > Spring MVC 教程 </span></li>
      <li><img src="/file/story/attachments/image/l/9c959254-8484-435c-8bec-29ac8603241e"> <span > Spring 的 @Controller 和 @RestController 註解 </span></li>
      <li><img src="/file/story/attachments/image/l/23a5a039-82be-4c29-bbd7-eb646c8fe0a5"> <span > Spring RequestMapping 註解 </span></li>
      <li><img src="/file/story/attachments/image/l/eefdd1e5-9cc0-4c6b-9fce-ed9b7ce5f28c"> <span > Spring 的 @RequestParam 註解 </span></li>
      <li><img src="/file/story/attachments/image/l/08b53522-0cd1-425b-9ab5-ebbc2a6b42db"> <span > Spring MVC 和 @ModelAttribute 註解 </span></li>
      <li><img src="/file/story/attachments/image/l/f7639558-5ba8-4c09-ae0f-fce1b41e94d8"> <span > Spring MVC 中的 Session 屬性 </span></li>
      <li><img src="/file/story/attachments/image/l/c02aceb9-e8aa-45d0-b55c-35aa8ea5a707"> <span > 在 Spring 中使用 Thymeleaf 的介紹 </span></li>
      <li><img src="/file/story/attachments/image/l/10432729-c09b-433c-b50a-5a2b5f3aaadb"> <span > Spring MVC 系列 </span></li>
    </ul>
  </div>
</section>
<section>
  <h2>Spring REST</h2>
</section>
<div>
  <p>Let’s explore the RESTful support in Spring MVC:</p>
</div>
<ul style="list-style-type:disc;">
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/fe6c166c-ff69-4377-9310-12e02e59e8e9" alt="Creating a Web Application with Spring"/>
    <span>Creating a Web Application with Spring</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/c5d05420-c24e-4f98-9bb7-86a798097378" alt="Build a REST API with Spring and Java Config"/>
    <span>Build a REST API with Spring and Java Config</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/a372d07f-d3ff-4ef6-87a4-9d8139209c1e" alt="Spring's RequestBody and ResponseBody Annotations"/>
    <span>Spring's RequestBody and ResponseBody Annotations</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/69801ea8-3752-489e-b38a-02766eb1d94c" alt="REST Pagination in Spring"/>
    <span>REST Pagination in Spring</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/6216bd5e-a3ce-446f-9869-4231342da6d6" alt="Error Handling for REST with Spring"/>
    <span>Error Handling for REST with Spring</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/a3608a24-1fbf-4c28-86be-12001017fa13" alt="Entity To DTO Conversion for a Spring REST API"/>
    <span>Entity To DTO Conversion for a Spring REST API</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/c70ab19e-c942-4004-bec7-bf9d46fc7c38" alt="Using SpringResponseEntity to Manipulate the HTTP Response"/>
    <span>Using SpringResponseEntity to Manipulate the HTTP Response</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/f51c5530-5fed-414b-a597-5ba464e21dc8" alt="Spring RestTemplate Error Handling"/>
    <span>Spring RestTemplate Error Handling</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/8a1951d8-9636-402f-885b-ddfadeab08dc" alt="REST with Spring Series"/>
    <span>REST with Spring Series</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/9214a2f7-a77a-4e3e-b18b-b07c8ba7af08" alt="Documenting a Spring REST API Using OpenAPI 3.0"/>
    <span>Documenting a Spring REST API Using OpenAPI 3.0</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/8908bb9e-cfdc-46bd-8491-6d1b32355319" alt="Logging Spring WebClient Calls"/>
    <span>Logging Spring WebClient Calls</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/a7e596a5-4f77-4544-938b-d77eeec16a31" alt="Spring WebClient vs. RestTemplate"/>
    <span>Spring WebClient vs. RestTemplate</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/bafd80d7-42f8-4951-81fb-ff09b73e6f0c" alt="RestTemplate Post Request with JSON"/>
    <span>RestTemplate Post Request with JSON</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/bcc025f7-1b6d-4df8-8f83-e2b955b5a287" alt="Open API Server Implementation Using OpenAPI Generator"/>
    <span>Open API Server Implementation Using OpenAPI Generator</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/080e6f2f-7895-4bd9-a604-f5081b1455a0" alt="Setting a Request Timeout for a Spring REST API"/>
    <span>Setting a Request Timeout for a Spring REST API</span>
  </li>
  <li style="margin-left: 20px;">
    <img src="/file/story/attachments/image/l/a637131f-a6a3-46a3-9483-7a3c405d1a7d" alt="Setting Up Swagger 2 with a Spring REST API Using Springfox"/>
    <span>Setting Up Swagger 2 with a Spring REST API Using Springfox</span>
  </li>
</ul

Spring 事務持久

Spring 支持各種持久解決方案:

  • 使用 Spring 啓動 Hibernate
  • 使用 Spring 學習 JPA (流行)
  • 使用 Spring 和 JPA 進行事務 (流行)
  • Spring JDBC (流行)
  • Spring 事務持久性系列 (流行) (系列)
  • Spring Data JPA 投影 (流行)
<section>
 <section class="series-category baeldung_series_block">
  <div>
   <img src="/file/story/attachments/image/l/ba8a9d1a-5010-4b3d-8bf5-56cbb717d17a">
   <h2>Spring Data</h2>
  </div>
  <div>
   <p>Spring 支持多種技術來訪問數據:</p>
  </div>
  <ul>
   <li><img src="/file/story/attachments/image/l/06dc68d1-073a-40ae-8955-b3c3c05870a3"> <span> Spring Data JPA 簡介 <span>(熱門)</span> </span></li >
   <li><img src="/file/story/attachments/image/l/4483da8c-2b58-419b-bac3-c4f2de92556c"> <span> Spring Data 註解 <span>(熱門)</span> </span></li >
   <li><img src="/file/story/attachments/image/l/468ba0b2-7845-488c-89c8-4171e66645e5"> <span> CrudRepository, JpaRepository, 和 PagingAndSortingRepository 在 Spring Data 中 <span>(熱門)</span> </span></li >
   <li><img src="/file/story/attachments/image/l/c3bf4537-4418-4c4b-8efb-bd599bcf7d92"> <span> Spring Data 系列 <span>(系列)</span> </span></li >
  </ul>
</section>
<section>
  <h2>測試 Spring</h2>
</section>
<section class="baeldung_series_block">
  <div>
    <p>最後,讓我們探索 Spring 中的測試支持:</p>
  </div>
  <ul>
    <li><img src="/file/story/attachments/image/l/2da237b3-1430-4379-9e39-91ca8a455603"> <span> Spring Boot 中的測試</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/0210995c-a9cc-4232-9b7b-95a952752455"> <span> Spring 中的集成測試</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/0eb76b5d-d9bd-496e-b888-5ef164f0e5a9"> <span> 在測試中覆蓋 Spring 屬性</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/db78604b-b7ec-4c41-85fc-8f6ee083b181"> <span> 在 Spring Boot 中測試時設置日誌級別</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/3bd55dbe-bc4d-47ee-b938-d9ac8d2bb0ff"> <span> 在 Spring 中模擬 WebClient</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/e746017f-23a6-4076-acc3-ce9fa1fa38f0"> <span> 使用 REST-assured 獲取和驗證響應數據</span></li>
    <li><img src="/file/story/attachments/image/l/ab1b9391-48a8-4409-9c7e-578481028067"> <span> ReflectionTestUtils 的指南,用於單元測試</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/494cc734-4b65-4407-b1a0-989281729b31"> <span> Mockito.mock() vs @Mock vs @MockBean</span> <span>(流行)</span></li>
    <li><img src="/file/story/attachments/image/l/99fa2522-9d7e-4903-9b8e-45cc25a172cb"> <span> Cucumber Spring 集成</span> <span>(流行)</span></li>
  </ul>
</section>

其他 Spring 教程

  • Security with Spring Series (popular) (Series) How to Secure an MVC project, Login and Logout, how to Secure a REST Service using OAuth.
  • Spring Reactive Series (Series) Learn about the reactive support in Spring
  • Spring Cloud Series (Series) An overview of the Spring Cloud family of projects.
user avatar
0 位用戶收藏了這個故事!
收藏

發佈 評論

Some HTML is okay.