导入STS时,为什么在jhipster构建的应用程序上出现这么多验证错误? [英] Why so many validation errors on a jhipster built app when importing into STS?

查看:120
本文介绍了导入STS时,为什么在jhipster构建的应用程序上出现这么多验证错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看> JHipster的正确Eclipse设置是什么? 并决定我有一个相似的问题,但有足够的差异,可以保证发布一个单独的问题.

I was looking at What is the correct Eclipse setup for JHipster? and decided I have a similar question with enough differences to warrant posting a separate question.

我能够使用运行正常的yo来构建和运行jhipster应用程序(我选择默认设置,但数据库除外-在本地和产品中均为MySQL,加上websocket和CSS的"y"包).

I am able to build and run a jhipster app using yo that seems to run ok (I choose defaults with the exception of the database - which is MySQL in both local and prod, plus websockets, and "y" to the CSS package).

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

I am then able to import the maven project into STS 3.5 and run it ok from there as well.

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

The only thing I'd like to figure out is why all of this seems to work even when there are so many DTD, JSON, XML and even one Java error reporting in STS for this project? Should I choose to ignore some of these validations in my STS project, or are these legitimate jhipster bugs?

错误包括:

描述资源路径位置类型

APT问题(1个项目)

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

JSR250: CommonAnnotations for Java, 2.5: @PostConstruct methods must not throw checked exceptions. Application.java /pdbClient/src/main/java/com/staples/pdbc line 35 Annotation Problem

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问题 . .

The declaration for the entity "ContentType" must end with '>'. strict.dtd /pdbClient/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/examples line 81 DTD Problem . . .

JSON问题(23个项目)

对象未关闭. bower.json/pdbClient/node_modules/bower/node_modules/bower-json/test/pkg-bower-json-格式错误的第1行JSON问题

Object is not closed. bower.json /pdbClient/node_modules/bower/node_modules/bower-json/test/pkg-bower-json-malformed line 1 JSON Problem

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

Unexpected token '/'. Expected '}', ','. broken.json /pdbClient/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test line 10 JSON Problem (etc.). . .

意外的令牌'<%'.应为字符串或'}'. _bower.json/pdbClient/node_modules/generator-jhipster/app/templates第4行JSON问题 (等等.). .

Unexpected token '<%'. Expected a string or '}'. _bower.json /pdbClient/node_modules/generator-jhipster/app/templates line 4 JSON Problem (etc.). . .

XML问题(30个项目)

元素的内容必须包含格式正确的字符数据或标记. _pom.xml/pdbClient/node_modules/generator-jhipster/app/templates第4行XML问题

The content of elements must consist of well-formed character data or markup. _pom.xml /pdbClient/node_modules/generator-jhipster/app/templates line 4 XML Problem

元素类型"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问题 (等等.). .

The element type "slurm" must be terminated by the matching end-tag "". big-not-pretty.xml /pdbClient/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/examples line 7 XML Problem (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问题 (等等.). .

The string "--" is not permitted within comments. test.xml /pdbClient/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/sax/examples line 10 XML Problem (etc.). . .

XML声明中版本"之后的值必须为带引号的字符串. fries.xml/pdbClient/node_modules/generator-jhipster/node_modules/cheerio/node_modules/CSSselect/test/sizzle/数据行1 XML问题 (等等.). .

The value following "version" in the XML declaration must be a quoted string. fries.xml /pdbClient/node_modules/generator-jhipster/node_modules/cheerio/node_modules/CSSselect/test/sizzle/data line 1 XML Problem (etc.). . .

与元素类型列"关联的属性"defaultValueDate"的值不得包含<"特点. _db-changelog-001.xml/pdbClient/node_modules/generator-jhipster/app/templates/src/main/resources/config/liquibase/changelog第28行XML问题

The value of attribute "defaultValueDate" associated with an element type "column" must not contain the '<' character. _db-changelog-001.xml /pdbClient/node_modules/generator-jhipster/app/templates/src/main/resources/config/liquibase/changelog line 28 XML Problem

与元素类型缓存"关联的属性名称"的值不得包含<"特点. _ehcache.xml/pdbClient/node_modules/generator-jhipster/app/templates/src/main/resources第20行XML问题 (等等.). .

The value of attribute "name" associated with an element type "cache" must not contain the '<' character. _ehcache.xml /pdbClient/node_modules/generator-jhipster/app/templates/src/main/resources line 20 XML Problem (etc.). . .

推荐答案

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

Here are more details on how to exclude unwanted folders inside Eclipse:

要在Eclipse(基于Eclipse 3.6.2)中排除"node_modules"文件夹

To exclude the ‘node_modules’ folder in Eclipse (based on Eclipse 3.6.2)

  • 右键单击项目"->资源"->资源过滤器"
  • 然后您应该选择:全部排除,适用于文件夹,名称与node_modules匹配
  • 按确定",您应该一切顺利.

src/main/webapp中还有2个文件夹应被排除:"bower_components"和"scripts"

There are also 2 folders inside src/main/webapp that should be excluded: "bower_components" and "scripts"

要这样做:

  • 右键单击项目"->"Javascript"->包含路径"
  • 然后您可以单击源"选项卡,然后选择your_project/src/main/webapp
  • 然后您可以选择排除:(无)->编辑->添加多个
  • 您可以选择"bower_components"和"scripts",然后单击确定".

这篇关于导入STS时,为什么在jhipster构建的应用程序上出现这么多验证错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆