jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.56k stars 4.02k forks source link

AWS Subgenerator returns 404 #7520

Closed ggotti closed 6 years ago

ggotti commented 6 years ago
Overview of the issue

When the AWS Subgenerator successfully deploys an Application to AWS, the html page screen appears, but all services return a 404.

The issue is the WAR generated in the new JHipster 5.0x version does not have the necessary SpringBootServletInitializer code to allow the WAR to be scanned correctly by Tomcat; it appears that this functionality was previously in the "_ApplicationWebXml.java" file.

Motivation for or Use Case

Feature doesn't work.

Reproduce the error
Related issues

7061, #7086, #7457

Suggest a Fix
JHipster Version(s)
monday@0.0.0 /Users/gerard/Code/jhipster/demo/monday
└── generator-jhipster@5.0.0-beta.0 
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.mycompany.myapp",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "5.0.0-beta.0",
    "baseName": "monday",
    "reactive": false,
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "replaced-by-jhipster-info",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ],
    "aws": {
      "applicationName": "ggigliotti-mon",
      "environmentName": "ggigiotti-mon",
      "bucketName": "ggigliotti-mon-b",
      "instanceType": "t2.small",
      "awsRegion": "us-east-1",
      "dbName": "ggigliottiMon",
      "dbInstanceClass": "db.t2.small"
    }
  }
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Environment and Tools

java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

git version 2.16.2

node: v8.9.4

npm: 5.6.0

yeoman: 1.8.5

yarn: 1.5.1

Docker version 18.03.0-ce, build 0520e24

docker-compose version 1.20.1, build 5d8c71b

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
jdubois commented 6 years ago

Ok that's my fault - I had the idea that WARs were not used anymore, and that's still the case here. We should put the file back, it doesn't cost much and solves the issue.

jdubois commented 6 years ago

I just added back the file, but no time to test the AWS sub-generator yet

jdubois commented 6 years ago

Thanks @ggotti this works now perfectly, following commit https://github.com/jhipster/generator-jhipster/commit/0269dae888b0487305129d4a5fdcb00b9dae3864