当前位置:网站首页>idea中新建的XML文件变成普通文件的解决方法.
idea中新建的XML文件变成普通文件的解决方法.
2022-07-01 14:49:00 【lwj_07】
一、新版本解决方法
造成原因:
造成这种现象一般就是创建xml文件的时候忘记输入.xml后缀了,这样在创建时idea会弹出窗口让你选择文件类型,如下图
之后手动重命名添加xml后缀也没有用。
解决方法:
解决方法就是打开设置,在File Types里找到Auto-detect file type by content标签,把里面的记录删掉即可。
或者在Xml标签的FIle name patterns中添加文件名即可
二、先前版本解决方法
这里引用了一下别人的文章:
截取如下:
File–>setting
1、选中Text,把下面的扩展名找到 *.xml 删除掉,
2、选中XML,把下面的扩展名添加一个 *.xml 即可
3.但是点击进去发现我的配置并没有问题.而且新建一个名字不一样的,加上后缀就可以.,继续创建原名字的,加上后缀却不行,
想了一想,想到解决办法了.先删除原名字文件,继续创建一个相同名字文件,但在命名时不写后缀,重新弹出选择文件类型框.选择xml,OK
4.如果创建出来的某个文件名.一直某种类型.看一下registered pattern中是否有在不知情的情况下配置了模板.如果有.直接删掉就好了.像我下图配置中.创建文件名为CheckTaskSizeMapper.就一定是.xml格式的
边栏推荐
- Research Report on the development trend and competitive strategy of the global pipeline robot inspection camera industry
- Written on the first day after Doris graduated
- Mongodb second talk - - mongodb High available Cluster Implementation
- 【14. 区间和(离散化)】
- 定了!2022海南二级造价工程师考试时间确定!报名通道已开启!
- Is the futures company found on Baidu safe? How do futures companies determine the regularity
- 30 Devops interview questions and answers
- [zero basic IOT pwn] reproduce Netgear wnap320 rce
- solidty-基础篇-结构体和数组,私有 / 公共函数,函数的返回值和修饰符,事件
- [dynamic programming] interval dp:p1005 matrix retrieval
猜你喜欢
微服务开发步骤(nacos)
一波三折,终于找到src漏洞挖掘的方法了【建议收藏】
[R language data science]: common evaluation indicators of machine learning
JVM performance tuning and practical basic theory part II
Cannot link redis when redis is enabled
C learning notes (5) class and inheritance
MIT team used graph neural network to accelerate the screening of amorphous polymer electrolytes and promote the development of next-generation lithium battery technology
[getting started with Django] 13 page Association MySQL "multi" field table (check)
sqlilabs less9
【14. 区间和(离散化)】
随机推荐
30 Devops interview questions and answers
Some thoughts on software testing
对于编程思想和能力有重大提升的书有哪些?
网速、宽带、带宽、流量三者之间的关系是什么?
TypeScript:var
数据湖系列之一 | 你一定爱读的极简数据平台史,从数据仓库、数据湖到湖仓一体
音乐播放器开发实例(可毕设)
[stage life summary] I gave up the postgraduate entrance examination and participated in the work. I have successfully graduated and just received my graduation certificate yesterday
Take you to API development by hand
Zabbix API与PHP的配置
tensorflow2-savedmodel convert to tflite
tensorflow2-savedmodel convert to pb(frozen_graph)
Day-02 database
Mongodb second call -- implementation of mongodb high availability cluster
Pat 1121 damn single (25 points) set
JVM performance tuning and practical basic theory part II
关于重载运算符的再整理
In hot summer, please put away this safe gas use guide!
炎炎夏日,这份安全用气指南请街坊们收好!
Provincial election + noi Part 10 probability statistics and polynomials