为什么 jhipster 构建的应用程序在导入到 STS 时会出现这么多验证错误?

2024-01-04

我在看JHipster 的正确 Eclipse 设置是什么? https://stackoverflow.com/questions/22424087/what-is-the-correct-eclipse-setup-for-jhipster并决定我有一个类似的问题,但有足够的差异来保证发布一个单独的问题。

我能够使用 yo 构建并运行一个 jhipster 应用程序,该应用程序似乎运行正常(我选择默认值,但数据库除外 - 本地和产品中都是 MySQL,加上 websockets 和 CSS 包的“y”)。

然后,我可以将 Maven 项目导入 STS 3.5 并从那里运行它。

我唯一想弄清楚的是,为什么即使这个项目的 STS 中有如此多的 DTD、JSON、XML 甚至一个 Java 错误报告,所有这一切似乎仍然有效?我应该选择忽略我的 STS 项目中的一些验证,还是这些合法的 jhipster 错误?

错误包括:

描述 资源路径 位置类型

APT 问题 (1 项)

JSR250:Java 的 CommonAnnotations,2.5:@PostConstruct 方法不得抛出已检查的异常。 Application.java /pdbClient/src/main/java/com/staples/pdbc 第 35 行注释问题

DTD 问题 (2 项)

实体“ContentType”的声明必须以“>”结尾。 strict.dtd /pdbClient/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/examples 第 81 行 DTD 问题 。 。 。

JSON 问题 (23 项)

对象未关闭。 Bower.json /pdbClient/node_modules/bower/node_modules/bower-json/test/pkg-bower-json-malformed 第 1 行 JSON 问题

意外的标记 '/'。预期的 '}', ','。 broken.json /pdbClient/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test 第 10 行 JSON 问题 (ETC。)。 。 。

意外的标记“

XML 问题(30 项)

元素的内容必须由格式良好的字符数据或标记组成。 _pom.xml /pdbClient/node_modules/generator-jhipster/app/templates 第 4 行 XML 问题

元素类型“slurm”必须由匹配的结束标记“”终止。 big-not-pretty.xml /pdbClient/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/examples 第 7 行 XML 问题 (ETC。)。 。 。

注释中不允许使用字符串“--”。 test.xml /pdbClient/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/examples 第 10 行 XML 问题 (ETC。)。 。 。

XML 声明中“version”后面的值必须是带引号的字符串。 fries.xml /pdbClient/node_modules/generator-jhipster/node_modules/cheerio/node_modules/CSSselect/test/sizzle/data 第 1 行 XML 问题 (ETC。)。 。 。

与元素类型“column”关联的属性“defaultValueDate”的值不得包含“

与元素类型“cache”关联的属性“name”的值不得包含“


以下是有关如何在 Eclipse 中排除不需要的文件夹的更多详细信息:

在 Eclipse 中排除“node_modules”文件夹(基于 Eclipse 3.6.2)

  • 右键单击项目 -> 资源 -> 资源过滤器
  • 然后,您应该选择:排除全部、应用于文件夹、名称匹配 node_modules
  • 按“确定”即可。

src/main/webapp 内还有 2 个文件夹应排除:“bower_components”和“scripts”

为此:

  • 右键单击项目 -> Javascript -> 包含路径
  • 然后,您可以单击“源”选项卡并选择 your_project/src/main/webapp
  • 然后您可以选择“排除:(无)->编辑->添加多个
  • 您可以选择“bower_components”和“scripts”,然后单击“确定”。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么 jhipster 构建的应用程序在导入到 STS 时会出现这么多验证错误? 的相关文章

随机推荐