无法加载资源404(未找到)

时间:2016-06-04 21:51:04

标签: gulp jhipster browser-sync

我已经克隆了最新版本的JHipster Registry并将其导入Spring Tool Suite。我能够成功启动注册表,并在环境配置端点中看到共享令牌。

(发电机jhipster:3.4.0)

我已使用以下配置创建了一个示例网关:

{
  "generator-jhipster": {
    "jhipsterVersion": "3.4.0",
    "baseName": "gateway",
    "packageName": "com.sample.gateway",
    "packageFolder": "com/sample/gateway",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "hibernateCache": "no",
    "clusteredHttpSession": "no",
    "websocket": "spring-websocket",
    "databaseType": "cassandra",
    "devDatabaseType": "cassandra",
    "prodDatabaseType": "cassandra",
    "searchEngine": "no",
    "buildTool": "maven",
    "jwtSecretKey": "487569610b520174d948be43fceeabc68716ceaf",
    "useSass": true,
    "applicationType": "gateway",
    "testFrameworks": [
      "gatling",
      "cucumber",
      "protractor"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ],
    "enableSocialSignIn": false
  }
}

我已使用以下配置创建了一个示例应用:

{
  "generator-jhipster": {
    "jhipsterVersion": "3.4.0",
    "baseName": "app",
    "packageName": "com.sample.app",
    "packageFolder": "com/sample/app",
    "serverPort": "9002",
    "authenticationType": "jwt",
    "hibernateCache": "no",
    "databaseType": "cassandra",
    "devDatabaseType": "cassandra",
    "prodDatabaseType": "cassandra",
    "searchEngine": "no",
    "buildTool": "maven",
    "jwtSecretKey": "e8aaff85cec927d25851087096331152d8a8c5a2",
    "enableTranslation": true,
    "applicationType": "microservice",
    "testFrameworks": [
      "gatling",
      "cucumber"
    ],
    "jhiPrefix": "jhi",
    "skipClient": true,
    "skipUserManagement": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ],
    "clusteredHttpSession": "no",
    "websocket": "no",
    "enableSocialSignIn": false
  }
}

我能够为网关加注星标并看到它连接到注册表。我也可以启动应用程序并看到它也连接到注册表。

但是,无论何时运行gulp并加载主页面,我都会在控制台中看到以下错误:

http://localhost:9000/app/services/profiles/profile.service.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9000/app/services/profiles/page-ribbon.directive.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9000/app/services/user/user.service.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9000/app/services/auth/register.service.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9000/app/services/auth/principal.service.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:9000/app/app.module.js Failed to load resource: the server responded with a status of 404 (Not Found)
....

是什么导致出现这些错误?

我确定它很简单,但我无法弄清楚为什么它无法找到这些文件。我可以浏览文件系统,它们显然就在那里。

编辑:

我注意到即使我从Gulp + browsersync访问网址,我也看到资源请求进入spring服务器。这看起来不正确,让我相信gulp / browsersync / proxy存在问题。

0 个答案:

没有答案