简体   繁体   中英

IntelliJ IDEA, xml name spaces for urn:java?

I'd like to get IntelliJ to recognize and read the classpath for name spaces in my web.xml or other xml files.

For example:

<whatever:HeartbeatService xmlns:heartbeat="urn:java:whatever">
    <ee:Named xmlns:ee="urn:java:ee">HeartbeatService</ee:Named>
    <inject:Singleton xmlns:inject="urn:java:javax.inject"/>
</whatever:HeartbeatService>

IntelliJ displays urn:java:whatever , urn:java:ee and urn:java:javax.inject in red, with the error message: "URI is not registered (Settings | Project Settings | Schemas and DTDs)".

Perhaps there is some way to register the class path that I'm just missing?

Alt + Enter在红色命名空间声明的顶部,然后“手动设置外部资源”。

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