Skip navigation

DSpace JSPUI

DSpace preserves and enables easy and open access to all types of digital content including text, images, moving images, mpegs and data sets

Learn More
DSpace logo
English
中文
  • Browse
    • Communities
      & Collections
    • Publication Year
    • Author
    • Title
    • Subject
    • Advisor
  • Search TDR
  • Rights Q&A
    • My Page
    • Receive email
      updates
    • Edit Profile
  1. NTU Theses and Dissertations Repository
  2. 電機資訊學院
  3. 資訊工程學系
Please use this identifier to cite or link to this item: http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/95667
Title: 從 Spring 中的 XML 命名空間到 Java 註解的自動轉換
Auto-Transform XML Namespaces to Java Annotations in Spring
Authors: 許容綮
Jung-Ching Hsu
Advisor: 李允中
Jonathan Lee
Keyword: Spring框架,依賴注入,自動轉換,設計模式,
Spring framework,DI,Auto-Transformer,Design Pattern,
Publication Year : 2024
Degree: 碩士
Abstract: 在大多數的 Java 專案中,經常會使用 Spring 框架來加速軟體開發的速度。然而,在傳統的 Spring 專案中,通常使用 XML 作為配置文件。然而,使用 XML 配置文件會遇到很多問題,例如文件可能會變得非常冗長和複雜,尤其是當配置項目很多時。此外,XML 配置文件靈活性不足,配置內容需要提前定義,無法動態配置。因此,我們希望能夠找到一套流程和方法,自動將 XML 配置文件轉換成 Java 配置文件。本研究主要提出一個 XML 轉換到註解的自動轉換流程。過程中,我們會對 Spring 專案的所有配置文件進行分析,並為每個命名空間訂製轉換規則,依據這些規則將 XML 轉換成 Java 配置文件。最後,我們提供一個驗證機制,用以確認轉換規則的正確性。為了驗證我們的轉換規則,我們以一個大型的專案作為範例進行佐證。
In most Java projects, the Spring framework is often used to accelerate software development. However, in traditional Spring projects, XML files are typically used as the configuration files. Nonetheless, using XML configuration files encounters many issues, such as files becoming very lengthy and complex, especially when there are many configuration items. Additionally, XML configuration files lack flexibility; the configuration content needs to be predefined and cannot be dynamically configured. Therefore, we aim to find a process to automatically transform XML configuration files into Java configuration files. This study proposes an automatic transform process from XML to annotations. During the process, we analyze all configuration files in the Spring project and compile conversion rules for each namespace. Based on these conversion rules, we convert XML configuration files into Java configuration files. Finally, we provide a validation mechanism to ensure the correctness of Java configuration files. To validate our conversion rules, we use an large-scale project as an example to support our process.
URI: http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/95667
DOI: 10.6342/NTU202404078
Fulltext Rights: 同意授權(全球公開)
Appears in Collections:資訊工程學系

Files in This Item:
File SizeFormat 
ntu-112-2.pdf9.23 MBAdobe PDFView/Open
Show full item record


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.

社群連結
聯絡資訊
10617臺北市大安區羅斯福路四段1號
No.1 Sec.4, Roosevelt Rd., Taipei, Taiwan, R.O.C. 106
Tel: (02)33662353
Email: ntuetds@ntu.edu.tw
意見箱
相關連結
館藏目錄
國內圖書館整合查詢 MetaCat
臺大學術典藏 NTU Scholars
臺大圖書館數位典藏館
本站聲明
© NTU Library All Rights Reserved