Closed vw98075 closed 4 years ago
AFAIK, oauth2
is the only authentication type that supports having a User
in a microservice application.
I've reproduced this issue. You can also use a simpler configuration such as below to reproduce this issue. If anyone has some time to look at it please go ahead as I'll be working on some other issues before coming to this. :smile:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.myapp"
},
"jhipsterVersion": "6.7.1",
"applicationType": "microservice",
"baseName": "jhipster",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8081",
"authenticationType": "jwt",
"cacheProvider": "memcached",
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "gradle",
"enableSwaggerCodegen": false,
"jwtSecretKey": "NzE3YmViOTUzZGY5NjAyZmRiOGNlYTVjNWM2MzAwZmM3ZjgwNGY3YTBkMTlhMWQzYWYzODI4ZmQ5ZmVkMDRlMmVmODA5MTc2NzcxNGFmODc2MjUxYmE2NzZhZmI3ZmIyYmVkMDJlM2FkYTc5NzkyM2NiYTFjZTRmN2EwYjE0ZmE=",
"embeddableLaunchScript": false,
"creationTimestamp": 1582521588761,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false,
"clientPackageManager": "npm",
"blueprints": [],
"skipClient": true,
"skipUserManagement": true
}
}
Overview of the issue
In a microservice with an optin of memcached as the following
Yes, with Memcached (distributed cache) - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache!
Reproduce the error
The CacheConfiguration, somehow, needs a UserRepository while there isn't a User entity in my JDL file. When I run the build command
I get the following error:
In the class, there are two places using the repository:
Related issues
Suggest a Fix
JHipster Version(s)
6.7.1
JHipster configuration
├── generator-jhipster@6.7.1 └─┬ generator-jhipster-spring-cloud-stream@1.0.0 └── generator-jhipster@6.7.1 deduped
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
Linux Mint 18.2 Sonya