Hipster stack for Java developers. Spring Boot + Angular in one handy generator.
Hello guys, How can I set default selected is Facebook in AvRadio react?
Example:
<AvRadioGroup name="radioSocial" required errorMessage="Pick one!" onChange={handleSocial}>
<AvRadio label="Facebook" value={Social.Facebook}/>
<AvRadio label="Youtube" value={Social.Youtube} />
<AvRadio label="Instagram" value={Social.Instagram} />
<AvRadio label="Tiktok" value={Social.Tiktok} />
</AvRadioGroup>
public interface TestingRepository extends JpaRepository<Testing, Long> {
@Query("SELECT aa FROM Testing aa ORDER BY aa.id DESC")
public List<Testing> findLastRecord();
}
I solved myself after some research. Jhipster docker-compose generator does not expose ports. If you want to expose it you can manually alter docker-compose.yml file or related docker file. Sample docker compose file for exposing uaa server database exposed to be accessible from host machine:
`version: '2'
services:
blog:
image: blog
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- 'SPRING_PROFILES_ACTIVE=prod,swagger'
- MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
- 'EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka'
- 'SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config'
- 'SPRING_DATA_MONGODB_URI=mongodb://blog-mongodb:27017'
- SPRING_DATA_MONGODB_DATABASE=blog
- JHIPSTER_SLEEP=30
- JHIPSTER_REGISTRY_PASSWORD=admin
blog-mongodb:
image: 'mongo:4.2.7'
gateway:
image: gateway
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- 'SPRING_PROFILES_ACTIVE=prod,swagger'
- MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
- 'EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka'
- 'SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config'
- 'SPRING_DATA_MONGODB_URI=mongodb://gateway-mongodb:27017'
- SPRING_DATA_MONGODB_DATABASE=gateway
- JHIPSTER_SLEEP=30
- JHIPSTER_REGISTRY_PASSWORD=admin
ports:
- '8080:8080'
gateway-mongodb:
image: 'mongo:4.2.7'
store:
image: store
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- 'SPRING_PROFILES_ACTIVE=prod,swagger'
- MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
- 'EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka'
- 'SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config'
- 'SPRING_DATA_MONGODB_URI=mongodb://store-mongodb:27017'
- SPRING_DATA_MONGODB_DATABASE=store
- JHIPSTER_SLEEP=30
- JHIPSTER_REGISTRY_PASSWORD=admin
store-mongodb:
image: 'mongo:4.2.7'
uaa:
image: uaa
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- 'SPRING_PROFILES_ACTIVE=prod,swagger'
- MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
- 'EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka'
- 'SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config'
- 'SPRING_DATA_MONGODB_URI=mongodb://uaa-mongodb:27017'
- SPRING_DATA_MONGODB_DATABASE=uaa
- JHIPSTER_SLEEP=30
- JHIPSTER_REGISTRY_PASSWORD=admin
uaa-mongodb:
image: 'mongo:4.2.7'
ports:
- '27017:27017'
jhipster-registry:
extends:
file: jhipster-registry.yml
service: jhipster-registry
jhipster-elasticsearch:
extends:
file: jhipster-console.yml
service: jhipster-elasticsearch
jhipster-logstash:
extends:
file: jhipster-console.yml
service: jhipster-logstash
depends_on:
- jhipster-elasticsearch
jhipster-console:
extends:
file: jhipster-console.yml
service: jhipster-console
depends_on:
- jhipster-elasticsearch
jhipster-import-dashboards:
extends:
file: jhipster-console.yml
service: jhipster-import-dashboards
depends_on:
- jhipster-elasticsearch
`
Hi,
This is my jhipster conifg (actuall kotlin hipster).
<details>
<summary>.yo-rc.json file</summary>
<pre>
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.test.test",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.10.4",
"applicationType": "monolith",
"baseName": "ProjectShoesBackend",
"packageName": "com.test.test",
"packageFolder": "com/test/test",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSwaggerCodegen": false,
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "angularX",
"clientTheme": "minty",
"clientThemeVariant": "dark",
"creationTimestamp": 1606397893626,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [
{
"name": "generator-jhipster-kotlin",
"version": "1.10.0"
}
],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": ["en"],
"blueprints": [
{
"name": "generator-jhipster-kotlin",
"version": "1.10.0"
}
],
"herokuAppName": "project-shoes-backend",
"herokuDeployType": "git",
"herokuJavaVersion": "1.8"
}
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
<details>
<summary>JDL entity definitions</summary>
<pre>
entity Brand {
name String
}
entity Shoes {
name String
}
entity Size {
lengthInCm Long,
sizeUS Long,
sizeEU Long
}
relationship OneToMany {
Brand{shoe} to Shoes{brand},
Shoes{sizes} to Size{shoe}
}
</pre>
</details>
##### **Environment and Tools**
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_272-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.272-b10, mixed mode)
git version 2.24.3 (Apple Git-128)
node: v14.9.0
npm: 6.14.7
Docker version 19.03.13, build 4484c46d9d
docker-compose version 1.27.4, build 40524192
identical .jhipster/Brand.json
identical .jhipster/Shoes.json
identical .jhipster/Size.json
I have a problem creating entities via the Angular frontend. When creating a Brand entity, it works. But when I try to create a Shoe Entity and link it with a Brand I always recieve a bad request error.
The log shows the following error message:
JSON parse error: Parameter specified as non-null is null: method com.test.test.domain.Brand.setShoes, parameter <set-?>; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Parameter specified as non-null is null: method com.test.test.domain.Brand.setShoes, parameter <set-?>
at [Source: (PushbackInputStream); line: 1, column: 63] (through reference chain: com.test.test.domain.Shoes["brand"]->com.test.test.domain.Brand["shoes"])]
Can somebody help me figure out the problem?
Thanks in advance
Tried to lint /Users/abhinavprakash/Projects/medihelp/bin/src/test/javascript/jest.conf.js but found no valid, enabled rules for this file type and file path in the resolved configuration.
Tried to lint /Users/abhinavprakash/Projects/medihelp/bin/src/test/javascript/protractor.conf.js but found no valid, enabled rules for this file type and file path in the resolved configuration.
1:18 error Require statement not part of import statement @typescript-eslint/no-var-requires
19:23 error 'mapTypescriptAliasToJestAlias' was used before it was defined @typescript-eslint/no-use-before-define
14:19 error 'process' is not defined no-undef
35:5 error Expected method shorthand object-shorthand
41:5 error Expected method shorthand object-shorthand
42:9 error 'browser' is not defined no-undef
44:9 error Do not use "// @ts-ignore" comments because they suppress compilation errors @typescript-eslint/ban-ts-ignore
45:9 error 'browser' is not defined no-undef
46:22 error Require statement not part of import statement @typescript-eslint/no-var-requires
47:32 error Require statement not part of import statement @typescript-eslint/no-var-requires
49:28 error Require statement not part of import statement @typescript-eslint/no-var-requires
51:9 error Do not use "// @ts-ignore" comments because they suppress compilation errors @typescript-eslint/ban-ts-ignore
Hi
I want to remove core, admin components of the jhipster frontend project any suggestions or articles for the same ?
Hi @aditya777hp, I you just want to suppress it from the front end, I would recommend to simply delete/comment out the admin options from the core / jhi-navbar (id="admin-menu"). This way you keep the possibility to re-implement those functions if needed.
@samuel4Jesus "But on Angular I don’t want attributes 3 & 4 to be created." if you mean by that, that you do not want them to appear on your frontend. you can manually hide them. Webapp / app entities. There is even a video on this subject https://www.youtube.com/watch?v=wNNCrrc5x4o
Have fun!
Thanks ... I went through the video and it shows how to hide column on the table.
But on my case I wish to restrict attributes from backend and frontend as well.
But it those restricted columns will be set manually on the service implementation class.
I hope am clear now.
hello, I needed help debugging jhipster monolith angular app with vscode. It runs fine from command line. However in vscode I have the spring boot dashboard which recognizes the project and gives me option to run/debug. When I run/debug I get the following error *
APPLICATION FAILED TO START
Description:
Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:
Property: driverclassname
Value: org.h2.Driver
Origin: "driverClassName" from property source "source"
Reason: Failed to load driver class org.h2.Driver in either of HikariConfig class loader or Thread context classloader
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: essai-1@0.0.1-SNAPSHOT
npm ERR! Found: axios@0.19.2
npm ERR! node_modules/axios
npm ERR! axios@"0.19.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer axios@"^0.18.0" from react-jhipster@0.11.0
npm ERR! node_modules/react-jhipster
npm ERR! react-jhipster@"0.11.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/pierre/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/pierre/.npm/_logs/2020-12-18T17_28_24_727Z-debug.log