Skip navigation

DSpace

機構典藏 DSpace 系統致力於保存各式數位資料(如:文字、圖片、PDF)並使其易於取用。

點此認識 DSpace
DSpace logo
English
中文
  • 瀏覽論文
    • 校院系所
    • 出版年
    • 作者
    • 標題
    • 關鍵字
    • 指導教授
  • 搜尋 TDR
  • 授權 Q&A
    • 我的頁面
    • 接受 E-mail 通知
    • 編輯個人資料
  1. NTU Theses and Dissertations Repository
  2. 電機資訊學院
  3. 資訊工程學系
請用此 Handle URI 來引用此文件: http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/95667
完整後設資料紀錄
DC 欄位值語言
dc.contributor.advisor李允中zh_TW
dc.contributor.advisorJonathan Leeen
dc.contributor.author許容綮zh_TW
dc.contributor.authorJung-Ching Hsuen
dc.date.accessioned2024-09-15T16:42:15Z-
dc.date.available2024-09-16-
dc.date.copyright2024-09-14-
dc.date.issued2024-
dc.date.submitted2024-08-12-
dc.identifier.citationdom4j. https://dom4j.github.io/.
Spring bean overview. https://docs.spring.io/spring-framework/reference/core/beans/definition.html.
spring-context-template. https://github.com/MarkusBernhardt/ spring-context-template.
A. Balalaie, A. Heydarnoori, P. Jamshidi, D. Tamburri, and T. Lynn. Microservices migration patterns. Software: Practice and Experience, 48, 07 2018.
L.-S. Chen. From monolithic to microservice: A dependency decoupling approach. Master’s thesis, National Taiwan University, 2023.
H.-Y. Huang. Atomic service generation from java-based open source software. Master’s thesis, National Taiwan University, 2019.
R. Laigner, M. Kalinowski, L. Carvalho, D. Mendonça, and A. Garcia. Towards a catalog of java dependency injection anti-patterns. In Proceedings of the XXXIII Brazilian Symposium on Software Engineering, SBES ’19, page 104–113, New York, NY, USA, 2019. Association for Computing Machinery.
V. Raj and R. Sadam. Patterns for migration of soa based applications to microservices architecture. Journal of Web Engineering, 07 2021.
E. Razina and D. Janzen. Effects of dependency injection on maintainability. In Proceedings of the 11th IASTED International Conference on Software Engineering and Applications, SEA ’07, page 7–12, USA, 2007. ACTA Press.
H. Rocha and M. T. Valente. How annotations are used in java: An empirical study. In International Conference on Software Engineering and Knowledge Engineering, 2011.
J.-J. Yu. Construct service components from open source java projects. Master’s thesis, National Taiwan University, 2021.
Z. Yu, C. Bai, L. Seinturier, and M. Monperrus. Characterizing the usage, evolution and impact of java annotations in practice. IEEE Transactions on Software Engineering, 47(5):969–986, 2021.
-
dc.identifier.urihttp://tdr.lib.ntu.edu.tw/jspui/handle/123456789/95667-
dc.description.abstract在大多數的 Java 專案中,經常會使用 Spring 框架來加速軟體開發的速度。然而,在傳統的 Spring 專案中,通常使用 XML 作為配置文件。然而,使用 XML 配置文件會遇到很多問題,例如文件可能會變得非常冗長和複雜,尤其是當配置項目很多時。此外,XML 配置文件靈活性不足,配置內容需要提前定義,無法動態配置。因此,我們希望能夠找到一套流程和方法,自動將 XML 配置文件轉換成 Java 配置文件。本研究主要提出一個 XML 轉換到註解的自動轉換流程。過程中,我們會對 Spring 專案的所有配置文件進行分析,並為每個命名空間訂製轉換規則,依據這些規則將 XML 轉換成 Java 配置文件。最後,我們提供一個驗證機制,用以確認轉換規則的正確性。為了驗證我們的轉換規則,我們以一個大型的專案作為範例進行佐證。zh_TW
dc.description.abstractIn 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.en
dc.description.provenanceSubmitted by admin ntu (admin@lib.ntu.edu.tw) on 2024-09-15T16:42:15Z
No. of bitstreams: 0
en
dc.description.provenanceMade available in DSpace on 2024-09-15T16:42:15Z (GMT). No. of bitstreams: 0en
dc.description.tableofcontentsVerification Letter from the Orcal Examination Committee i
Acknowledgements ii
摘要 iii
Abstract iv
Contents vi
List of Figures x
List of Tables xi
Chapter 1 Introduction 1
Chapter 2 Background Work 3
Chapter 3 Related Work 5
3.1 Dependency Injection 5
3.2 Java Annotation 6
3.3 Design Pattern in Software Migration 6
Chapter 4 The Process of Auto-Transformer 8
Chapter 5 Parse XML file 10
Chapter 6 Build Bean Container 12
6.1 Identify all BeanFactory in the project 13
6.2 Identify all configurations files used by each BeanFactory 14
6.3 Parse configuration files and extract bean definitions 15
Chapter 7 Conversion rules 17
7.1 Conversion Rule for XML file 18
7.2 Conversion Rule for <beans/> Namespace 19
7.2.1 For <bean/> 19
7.2.2 For <import/> 20
7.3 Conversion Rule for <util/> Namespace 20
7.3.1 For <map/>, <set/>, <list/> 20
7.4 Conversion Rule for <aop/> Namespace 21
7.4.1 For <aop/> Namespace 21
7.4.2 For <pointcut/> 21
7.4.3 For Advice Elements 22
7.5 Conversion Rule for <mvc/> Namespace 23
7.5.1 For <mvc/> Namespace 23
7.5.2 For <annotation-driven/> 24
7.5.3 For <resources/> 24
7.5.4 For <interceptors/> 24
7.6 Conversion Rule for <batch/> Namespace 25
7.6.1 For <batch/> Namespace 25
7.6.2 For <job/> 25
7.6.3 For <step/> 26
7.7 Conversion Rule for <security/> Namespace 27
7.7.1 For <security/> Namespace 27
7.7.2 For <http/> 27
7.7.3 For <authentication-manager/> 28
7.7.4 For <global-method-security/> 29
7.8 Conversion Rule for <context/> Namespace 29
7.8.1 For <component-scan/> 29
7.8.2 For <property-placeholder/> 29
7.9 Conversion Rule for <task/> Namespace 30
7.9.1 For <executor/> 30
7.9.2 For <scheduler/> 31
7.9.3 For <annotation-driven/> 31
7.10 Conversion Rule for <int/> Namespace 32
7.10.1 For <int/> namespace 32
7.10.2 For <channel/> 32
7.10.3 For <gateway/> 33
7.10.4 For <service-activator/> 34
7.10.5 For <router/> 35
7.10.6 For <filter/> 37
7.10.7 For <splitter/> 38
7.10.8 For <transformer/> 38
7.11 Conversion Rule for <tx/> Namespace 40
7.11.1 For <annotation-driven/> 40
7.12 Conversion Rule for <cache/> Namespace 40
7.12.1 For <annotation-driven/> 40
7.13 Conversion Rule for <context-template/> 41
7.13.1 For <import/> 41
7.13.2 For <variable/> 42
7.13.3 For imported XML file 42
7.14 Implementation 43
Chapter 8 Generating Java Configuration 45
Chapter 9 Verification 48
9.1 Verify Bean Definition 48
9.2 Verify Bean Instance 50
Chapter 10 Case Study 53
10.1 Issue 53
10.1.1 Problem Description 54
10.1.2 Root Cause 55
10.2 Findings 55
Chapter 11 Conclusion 57
11.1 Summary 57
11.2 Future work 57
References 59
-
dc.language.isoen-
dc.subject設計模式zh_TW
dc.subject自動轉換zh_TW
dc.subject依賴注入zh_TW
dc.subjectSpring框架zh_TW
dc.subjectDesign Patternen
dc.subjectSpring frameworken
dc.subjectDIen
dc.subjectAuto-Transformeren
dc.title從 Spring 中的 XML 命名空間到 Java 註解的自動轉換zh_TW
dc.titleAuto-Transform XML Namespaces to Java Annotations in Springen
dc.typeThesis-
dc.date.schoolyear112-2-
dc.description.degree碩士-
dc.contributor.oralexamcommittee馬尚彬;李俊宏;王秉豐;薛念林zh_TW
dc.contributor.oralexamcommitteeShang-Pin Ma;Chiung-Hon Lee;Ping-Feng Wang;Nien-Lin Hsuehen
dc.subject.keywordSpring框架,依賴注入,自動轉換,設計模式,zh_TW
dc.subject.keywordSpring framework,DI,Auto-Transformer,Design Pattern,en
dc.relation.page60-
dc.identifier.doi10.6342/NTU202404078-
dc.rights.note同意授權(全球公開)-
dc.date.accepted2024-08-14-
dc.contributor.author-college電機資訊學院-
dc.contributor.author-dept資訊工程學系-
顯示於系所單位:資訊工程學系

文件中的檔案:
檔案 大小格式 
ntu-112-2.pdf9.23 MBAdobe PDF檢視/開啟
顯示文件簡單紀錄


系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。

社群連結
聯絡資訊
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