摘要
为提高项目开发的效率,对Spring新特性Java Config在Web开发中的应用作了深入研究。以传统的使用XML配置Spring的方式为对比,对新特性Java Config的使用方法和其优势作了介绍。以实际案例的形式具体描述了Spring中XML配置方式和Java Config配置的方式。结果表明,Java Config在Web项目开发中具有操作简单、编译器错误检查、更符合程序员编程规范等优势。使用Java Config的方式还可以配合Servlet3.0完全去掉传统Web项目中固有的web.xml文件。Java Config将成为Web开发的流行趋势。
In order to improve the efficiency of project development,intensive study of the application of Spring's new feature Java Config in Web development is made. By contrasting with the conventional way of configuring Spring with XML,the usage method and advantage of Spring's new feature Java Config are introduced. In the form of actual cases,Spring's XML config and Java Config are described. As a result,Java Config in Web development has some advantages such as simple operation,compiler error checking,programming specification. The way of Java Config combined with Servlet3. 0 can get rid of conventional file web. xml. Java Config will be the main trend of the Web development in the future.
出处
《微型机与应用》
2017年第18期26-29,共4页
Microcomputer & Its Applications