I am not able to use jhipster microservice without

2019-03-03 08:22发布

问题:

 `{
      "generator-jhipster": {
        "promptValues": {
          "packageName": "com.xyz.service",
          "nativeLanguage": "en"
        },
        "jhipsterVersion": "5.0.0-beta.3",
        "applicationType": "microservice",
        "baseName": "MicroServiceStarterKit",
        "packageName": "com.xyz.service",
        "packageFolder": "com/xyz/service",
        "serverPort": "8082",
        "authenticationType": "jwt",
        "cacheProvider": "hazelcast",
        "enableHibernateCache": true,
        "websocket": false,
        "databaseType": "sql",
        "devDatabaseType": "h2Disk",
        "prodDatabaseType": "postgresql",
        "searchEngine": false,
        "messageBroker": false,
        "serviceDiscoveryType": false,
        "buildTool": "maven",
        "enableSwaggerCodegen": false,
        "jwtSecretKey": "token",
        "enableTranslation": false,
        "testFrameworks": [],
        "jhiPrefix": "jhi",
        "nativeLanguage": "en",
        "languages": [
          "en"
        ],
        "clientPackageManager": "yarn",
        "skipClient": true,
        "skipUserManagement": true
      }
    }`

when I run ./mvnw command it shows application is running. The url http://localhost:8082 is not accessible and throws 404 error. When I use serviceDiscoveryType property as eureka it works fine and index.html open

回答1:

When disabling service discovery in a microservice, the microservice uses a context-path. In your case, the microservice will be available at:

http://localhost:8082/MicroServiceStarterKit



标签: jhipster