简体   繁体   中英

generating Deployment Descriptor (web.xml) in intellij

I'm using gradle for my spring projects and need to copy and paste the content of web.xml (and also other xml based spring configurations) every single time! Is there anyway to auto generate these files, like the way it can be done in eclipse?

好的,我知道的最好的方法是为不同的xml文件创建一个新的模板文件:

Right Click on project > New > Edit File Template > ...

根据IntelliJ IDEA文档,您可以使用Web构面设置生成部署描述符: 管理部署描述符 - 至少从版本2016.1开始

The 1st answer is great way for creating own file template. But Intellij has already generated default templates for web.xml and Spring file.

As for now, by using alt + ins , Intellij provides JSP Tag Library Descriptor , New Faces Config File , and Spring Config which is helpful for xml based spring configurations .

And for web.xml file, Project Structure (ctrl + alt + shift + s) > Facets > Deployment Descriptors > + > web.xml will generate a web.xml file for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM