Thursday, June 23, 2022

Jhipster Microservice with Jhipster Register and Jhipster Gateway

 Make sure you have MySQL server and client running and ready as we are using MySQL as DB for our JHipstet POC.

1- Install Jhipster registry from github and do npm install and npm start
2- Create microservice – change oracle userid and pwd
3- create gateway – change oracle userid and pwd
4- create entity in microservice
5- execute that entity from gateway
6- execute microservice
7- execute gateway
8- do 5 and 6 step using docker
‘- install oracle in docker
‘- install microservice in docker
‘- install gateway in docker

===========Jhipster Registry
First install Jhipster Registry from the below location https://github.com/jhipster/jhipster-registry

https://github.com/jhipster/jhipster-registry.git

execute command

C:\STS-Workspace\jhipstermicroservice\jhipster-registry>mvnw

==========================================Jhipster Microservice
1- Create a simple microservice

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
C:\STS-Workspace\jhipstermicroservice\siddhumicroservice>jhipster
INFO! Using bundled JHipster
 
        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.8.1
 
Application files will be generated in folder: C:\STS-Workspace\jhipstermicroservice\siddhumicroservice
 _______________________________________________________________________________________________________________
 
  Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
  If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
 _______________________________________________________________________________________________________________
 
WARNING! Your Node version is not LTS (Long Term Support), use it at your own risk! JHipster does not support non-LTS releases, so if you encounter a bug, please use a LTS version first.
? Which *type* of application would you like to create? Microservice application
? What is the base name of your application? siddhumicroservice
? Do you want to make it reactive with Spring WebFlux? No
? As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port conflicts. 8081
? What is your default Java package name? com.siddhu.microservice
? Which service discovery server do you want to use? JHipster Registry (uses Eureka, provides Spring Cloud Config support and monitoring dashboards)
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which *production* database would you like to use? MySQL
? Which *development* database would you like to use? MySQL
? Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache!
? Would you like to use Maven or Gradle for building the backend? Maven
? Which other technologies would you like to use?
? Would you like to enable internationalization support? No
? Please choose the native language of the application English
? Besides JUnit and Jest, which testing frameworks would you like to use? Cypress
? Would you like to install other generators from the JHipster Marketplace? No
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days
        for: CN=Java Hipster, OU=Development, O=com.siddhu.microservice, L=, ST=, C=
 
KeyStore 'C:\STS-Workspace\jhipstermicroservice\siddhumicroservice\src\main\resources\config\tls\/keystore.p12' generated successfully.
 
   create .prettierrc
   create .prettierignore
   create package.json
    force .yo-rc-global.json
   create .gitattributes
    force .yo-rc.json
   create .editorconfig
   create .gitignore
   create sonar-project.properties
   create .lintstagedrc.js
   create .husky\pre-commit
   create mvnw
   create mvnw.cmd
   create .mvn\jvm.config
   create .mvn\wrapper\maven-wrapper.jar
   create .mvn\wrapper\maven-wrapper.properties
   create src\main\resources\banner.txt
   create src\main\resources\config\liquibase\changelog\00000000000000_initial_schema.xml
   create src\main\resources\config\liquibase\master.xml
   create src\main\docker\jib\entrypoint.sh
   create checkstyle.xml
   create .devcontainer\Dockerfile
   create pom.xml
   create src\main\resources\logback-spring.xml
   create src\main\resources\i18n\messages.properties
   create .devcontainer\devcontainer.json
   create src\main\docker\app.yml
   create src\main\docker\central-server-config\docker-config\application.yml
   create src\main\docker\jhipster-control-center.yml
   create src\main\docker\central-server-config\localhost-config\application.yml
   create src\main\docker\sonar.yml
   create src\main\docker\zipkin.yml
   create src\main\docker\monitoring.yml
   create src\main\docker\prometheus\prometheus.yml
   create src\main\docker\grafana\provisioning\dashboards\dashboard.yml
   create src\main\docker\grafana\provisioning\dashboards\JVM.json
   create src\main\resources\templates\error.html
   create src\main\docker\grafana\provisioning\datasources\datasource.yml
   create src\main\docker\mysql.yml
   create src\main\resources\config\application.yml
   create src\main\docker\central-server-config\README.md
   create src\main\resources\config\application-dev.yml
   create src\main\docker\jhipster-registry.yml
   create src\main\resources\config\application-tls.yml
   create src\main\resources\config\application-prod.yml
   create src\main\resources\static\index.html
   create src\main\resources\config\bootstrap.yml
   create src\main\resources\config\bootstrap-prod.yml
   create src\test\resources\logback.xml
   create src\test\resources\junit-platform.properties
   create src\main\java\com\siddhu\microservice\security\SpringSecurityAuditorAware.java
   create src\main\java\com\siddhu\microservice\config\AsyncConfiguration.java
   create src\main\java\com\siddhu\microservice\domain\package-info.java
   create src\main\java\com\siddhu\microservice\client\UserFeignClientInterceptor.java
   create src\main\java\com\siddhu\microservice\security\SecurityUtils.java
   create src\main\java\com\siddhu\microservice\config\DateTimeFormatConfiguration.java
   create src\main\java\com\siddhu\microservice\domain\AbstractAuditingEntity.java
   create src\main\java\com\siddhu\microservice\security\AuthoritiesConstants.java
   create src\main\java\com\siddhu\microservice\config\LoggingConfiguration.java
   create src\main\java\com\siddhu\microservice\repository\package-info.java
   create src\main\java\com\siddhu\microservice\security\package-info.java
   create src\main\java\com\siddhu\microservice\config\ApplicationProperties.java
   create src\main\java\com\siddhu\microservice\service\package-info.java
   create src\main\java\com\siddhu\microservice\SiddhumicroserviceApp.java
   create src\main\java\com\siddhu\microservice\config\JacksonConfiguration.java
   create src\main\java\com\siddhu\microservice\security\jwt\TokenProvider.java
   create src\main\java\com\siddhu\microservice\ApplicationWebXml.java
   create src\main\java\com\siddhu\microservice\config\LoggingAspectConfiguration.java
   create src\main\java\com\siddhu\microservice\security\jwt\JWTFilter.java
   create src\main\java\com\siddhu\microservice\config\WebConfigurer.java
   create src\main\java\com\siddhu\microservice\management\SecurityMetersService.java
   create src\main\java\com\siddhu\microservice\config\Constants.java
   create src\main\java\com\siddhu\microservice\security\jwt\JWTConfigurer.java
   create src\main\java\com\siddhu\microservice\GeneratedByJHipster.java
   create src\main\java\com\siddhu\microservice\config\LocaleConfiguration.java
   create src\main\java\com\siddhu\microservice\config\SecurityConfiguration.java
   create src\main\java\com\siddhu\microservice\aop\logging\LoggingAspect.java
   create src\main\java\com\siddhu\microservice\config\DatabaseConfiguration.java
   create src\main\java\com\siddhu\microservice\config\FeignConfiguration.java
   create src\main\java\com\siddhu\microservice\config\package-info.java
   create src\main\java\com\siddhu\microservice\config\LiquibaseConfiguration.java
   create src\main\java\com\siddhu\microservice\web\rest\package-info.java
   create README.md
   create src\test\java\com\siddhu\microservice\security\SecurityUtilsUnitTest.java
   create src\main\java\com\siddhu\microservice\web\rest\errors\package-info.java
   create src\test\java\com\siddhu\microservice\repository\timezone\DateTimeWrapper.java
   create src\test\java\com\siddhu\microservice\security\jwt\TokenProviderSecurityMetersTests.java
   create src\main\java\com\siddhu\microservice\web\rest\errors\BadRequestAlertException.java
   create src\test\java\com\siddhu\microservice\repository\timezone\DateTimeWrapperRepository.java
   create src\test\java\com\siddhu\microservice\security\jwt\JWTFilterTest.java
   create src\test\java\com\siddhu\microservice\TechnicalStructureTest.java
   create src\main\java\com\siddhu\microservice\web\rest\errors\ErrorConstants.java
   create src\test\resources\config\application.yml
   create src\test\java\com\siddhu\microservice\IntegrationTest.java
   create src\main\java\com\siddhu\microservice\web\rest\errors\ExceptionTranslator.java
   create src\main\java\com\siddhu\microservice\web\rest\errors\FieldErrorVM.java
   create src\main\java\com\siddhu\microservice\web\rest\vm\package-info.java
   create src\test\resources\config\application-testcontainers.yml
   create src\test\java\com\siddhu\microservice\config\WebConfigurerTest.java
   create src\test\java\com\siddhu\microservice\web\rest\TestUtil.java
   create src\test\java\com\siddhu\microservice\config\WebConfigurerTestController.java
   create src\test\java\com\siddhu\microservice\web\rest\errors\ExceptionTranslatorTestController.java
   create src\test\resources\config\bootstrap.yml
   create src\test\java\com\siddhu\microservice\web\rest\errors\ExceptionTranslatorIT.java
   create src\test\java\com\siddhu\microservice\management\SecurityMetersServiceTests.java
   create src\test\java\com\siddhu\microservice\config\timezone\HibernateTimeZoneIT.java
   create src\test\java\com\siddhu\microservice\security\jwt\TokenProviderTest.java
   create src\test\java\com\siddhu\microservice\web\rest\WithUnauthenticatedMockUser.java
    force .yo-rc.json
Git repository initialized.
 
Changes to package.json were detected.
Error detecting the package manager. Falling back to npm.
 
Running npm install for you to install the required dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
 
> siddhumicroservice@0.0.0 prepare
> husky install
 
husky - Git hooks installed
 
added 654 packages, and audited 655 packages in 2m
 
79 packages are looking for funding
  run `npm fund` for details
 
2 critical severity vulnerabilities
 
To address all issues (including breaking changes), run:
  npm audit fix --force
 
Run `npm audit` for details.
Application successfully committed to Git from C:\STS-Workspace\jhipstermicroservice\siddhumicroservice.
 
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
 
Server application generated successfully.
 
Run your Spring Boot application:
./mvnw (mvnw if using Windows Command Prompt)
Congratulations, JHipster execution is complete!
Sponsored with <img draggable="false" role="img" class="emoji" alt="❤️" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/2764.svg">  by @oktadev.

2- Change the user id and pwd for mysql

C:\STS-Workspace\jhipstermicroservice\siddhumicroservice\src\main\resources\config\application-dev.yml

datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://localhost:3306/siddhumicroservice?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
username: root
password: root


3- Create entity in siddhumicroservice

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
C:\STS-Workspace\jhipstermicroservice\siddhumicroservice>jhipster entity Category
INFO! Switching to JHipster installed locally in current project's node repository (node_modules)
 
        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.8.1
 
 
The entity Category is being created.
 
 
Generating field #1
 
? Do you want to add a field to your entity? Yes
? What is the name of your field? name
? What is the type of your field? String
? Do you want to add validation rules to your field? Yes
? Which validation rules do you want to add? Required
 
================= Category =================
Fields
name (String) required
 
 
Generating field #2
 
? Do you want to add a field to your entity? Yes
? What is the name of your field? description
? What is the type of your field? String
? Do you want to add validation rules to your field? No
 
================= Category =================
Fields
name (String) required
description (String)
 
 
Generating field #3
 
? Do you want to add a field to your entity? No
 
================= Category =================
Fields
name (String) required
description (String)
 
 
Generating relationships to other entities
 
? Do you want to add a relationship to another entity? No
 
================= Category =================
Fields
name (String) required
description (String)
 
 
 
? Do you want to use separate service class for your business logic? Yes, generate a separate service interface and implementation
? Do you want to use a Data Transfer Object (DTO)? Yes, generate a DTO with MapStruct
? Do you want to add filtering? Not needed
? Is this entity read-only? No
? Do you want pagination and sorting on your entity? No
 
Everything is configured, generating the entity...
 
     info Creating changelog for entities Category
     info searchEngine is missing in .jhipster/Category.json, should opt-in for gateway/microservice entities
    force .yo-rc-global.json
    force .yo-rc.json
    force .jhipster\Category.json
   create src\main\resources\config\liquibase\changelog\20220623123638_added_entity_Category.xml
   create src\main\resources\config\liquibase\fake-data\category.csv
 conflict src\main\resources\config\liquibase\master.xml
? Overwrite src\main\resources\config\liquibase\master.xml? overwrite
    force src\main\resources\config\liquibase\master.xml
   create src\main\java\com\siddhu\microservice\repository\CategoryRepository.java
   create src\main\java\com\siddhu\microservice\service\CategoryService.java
   create src\main\java\com\siddhu\microservice\service\impl\CategoryServiceImpl.java
   create src\main\java\com\siddhu\microservice\service\dto\CategoryDTO.java
   create src\main\java\com\siddhu\microservice\domain\Category.java
   create src\main\java\com\siddhu\microservice\service\mapper\EntityMapper.java
   create src\main\java\com\siddhu\microservice\service\mapper\CategoryMapper.java
   create src\test\java\com\siddhu\microservice\web\rest\CategoryResourceIT.java
   create src\test\java\com\siddhu\microservice\domain\CategoryTest.java
   create src\test\java\com\siddhu\microservice\service\dto\CategoryDTOTest.java
   create src\main\java\com\siddhu\microservice\web\rest\CategoryResource.java
   create src\test\java\com\siddhu\microservice\service\mapper\CategoryMapperTest.java
    force .yo-rc.json
    force .jhipster\Category.json
 
No change to package.json was detected. No package manager install will be executed.
Entity Category generated successfully.
Congratulations, JHipster execution is complete!
Sponsored with <img draggable="false" role="img" class="emoji" alt="❤️" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/2764.svg">  by @oktadev.

4- Start the Microservice using command mvnw

1
2
3
4
5
6
7
8
9
10
11
12
C:\STS-Workspace\jhipstermicroservice\siddhumicroservice>mnvw
 
 
----------------------------------------------------------
        Application 'siddhumicroservice' is running! Access URLs:
        Local:          http://localhost:8081/
        External:       http://192.168.56.1:8081/
        Profile(s):     [dev, api-docs]
----------------------------------------------------------
2022-06-23 18:09:15.917  INFO 11124 --- [  restartedMain] c.s.microservice.SiddhumicroserviceApp   :
----------------------------------------------------------
        Config Server:  Connected to the JHipster Registry config server!

You will be able to see the entry of our microservice in registry.

Also check the MySQL and you will find we have one new schema with default data as per our Catagory is created. Junk data is created becuase we had below faker entry in

C:\STS-Workspace\jhipstermicroservice\siddhumicroservice\src\main\resources\config\application-dev.yml

liquibase:
# Remove ‘faker’ if you do not want the sample data to be loaded automatically
contexts: dev, faker

================================================Jhipster Gateway
1- Create a simple gateway

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
C:\STS-Workspace\jhipstermicroservice\siddhugateway>jhipster
INFO! Using bundled JHipster
 
        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.8.1
 
Application files will be generated in folder: C:\STS-Workspace\jhipstermicroservice\siddhugateway
 _______________________________________________________________________________________________________________
 
  Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
  If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
 _______________________________________________________________________________________________________________
 
WARNING! Your Node version is not LTS (Long Term Support), use it at your own risk! JHipster does not support non-LTS releases, so if you encounter a bug, please use a LTS version first.
? Which *type* of application would you like to create? Gateway application
? What is the base name of your application? siddhugateway
? As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port conflicts. 8080
? What is your default Java package name? com.siddhu.gateway
? Which service discovery server do you want to use? JHipster Registry (uses Eureka, provides Spring Cloud Config support and monitoring dashboards)
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which *production* database would you like to use? MySQL
? Which *development* database would you like to use? MySQL
? Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache!
? Do you want to use Hibernate 2nd level cache? No
? Would you like to use Maven or Gradle for building the backend? Maven
? Which other technologies would you like to use?
? Which *Framework* would you like to use for the client? Angular
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster
? Would you like to enable internationalization support? No
? Please choose the native language of the application English
? Besides JUnit and Jest, which testing frameworks would you like to use? Cypress
? Would you like to install other generators from the JHipster Marketplace? No
? Would you like to generate code coverage for Cypress tests? [Experimental] No
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days
        for: CN=Java Hipster, OU=Development, O=com.siddhu.gateway, L=, ST=, C=
 
 
 
 
Run `npm audit` for details.
Application successfully committed to Git from C:\STS-Workspace\jhipstermicroservice\siddhugateway.
 
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
 
Server application generated successfully.
 
Run your Spring Boot application:
./mvnw (mvnw if using Windows Command Prompt)
 
Client application generated successfully.
 
Start your Webpack development server with:
 npm start
 
 
> siddhugateway@0.0.1-SNAPSHOT clean-www
> rimraf target/classes/static/app/{src,target/}
 
Congratulations, JHipster execution is complete!
Sponsored with <img draggable="false" role="img" class="emoji" alt="❤️" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/2764.svg">  by @oktadev.

2- Change the user id and pwd for mysql

C:\STS-Workspace\jhipstermicroservice\siddhugateway\src\main\resources\config\application-dev.yml

r2dbc:
url: r2dbc:mysql://localhost:3306/siddhugateway?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
username: root
password: root

3- Create entity in siddhugateway

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
C:\STS-Workspace\jhipstermicroservice\siddhugateway>jhipster entity Category
INFO! Switching to JHipster installed locally in current project's node repository (node_modules)
 
        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.8.1
 
? Do you want to generate this entity from an existing microservice? Yes
? Enter the path to the microservice root directory: ../siddhumicroservice
 
Found the .jhipster\Category.json configuration file, entity can be automatically generated!
 
 
The entity Category is being updated.
 
? Do you want to update the entity? This will replace the existing files for this entity, all your custom code will be overwritten Yes, re generate the entity
     info Creating changelog for entities Category
     info searchEngine is missing in .jhipster/Category.json, should opt-in for gateway/microservice entities
    force .yo-rc-global.json
    force .yo-rc.json
    force .jhipster\Category.json
    force ..\siddhumicroservice\.jhipster\Category.json
 conflict src\main\webapp\app\entities\entity-routing.module.ts
? Overwrite src\main\webapp\app\entities\entity-routing.module.ts? overwrite
    force src\main\webapp\app\entities\entity-routing.module.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\delete\category-delete-dialog.component.html
   create src\main\webapp\app\entities\siddhumicroservice\category\category.model.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\update\category-update.component.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\delete\category-delete-dialog.component.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\list\category.component.html
   create src\main\webapp\app\entities\siddhumicroservice\category\detail\category-detail.component.html
   create src\main\webapp\app\entities\siddhumicroservice\category\detail\category-detail.component.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\list\category.component.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\category.module.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\route\category-routing.module.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\route\category-routing-resolve.service.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\service\category.service.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\route\category-routing-resolve.service.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\update\category-update.component.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\list\category.component.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\delete\category-delete-dialog.component.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\detail\category-detail.component.ts
   create src\test\javascript\cypress\integration\entity\category.spec.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\service\category.service.ts
   create src\main\webapp\app\entities\siddhumicroservice\category\update\category-update.component.html
 conflict src\main\webapp\app\layouts\navbar\navbar.component.html
? Overwrite src\main\webapp\app\layouts\navbar\navbar.component.html? overwrite
    force src\main\webapp\app\layouts\navbar\navbar.component.html
 
No change to package.json was detected. No package manager install will be executed.
Entity Category generated successfully.
 
Running `webapp:build` to update client app
 
 
> siddhugateway@0.0.1-SNAPSHOT webapp:build
> npm run clean-www && npm run webapp:build:dev
 
 
> siddhugateway@0.0.1-SNAPSHOT clean-www
> rimraf target/classes/static/app/{src,target/}
 
 
> siddhugateway@0.0.1-SNAPSHOT webapp:build:dev
> ng build --configuration development
 
Node.js version v17.6.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
? Would you like to share anonymous usage data about this project with the Angular Team at
Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more
details and how to change this setting, see https://angular.io/analytics. No
√ Browser application bundle generation complete.
√ Copying assets complete.
√ Index html generation complete.
 
Initial Chunk Files                                                            | Names                                       |  Raw Size
styles.css                                                                     | styles                                      | 205.42 kB |
polyfills.js                                                                   | polyfills                                   | 134.24 kB |
runtime.js                                                                     | runtime                                     |  12.47 kB |
main.js                                                                        | main                                        | 792 bytes |
 
                                                                               | Initial Total                               | 352.90 kB
 
Lazy Chunk Files                                                               | Names                                       |  Raw Size
src_main_webapp_bootstrap_ts.js                                                | bootstrap                                   |   4.76 MB |
src_main_webapp_app_admin_metrics_metrics_module_ts.js                         | metrics-metrics-module                      | 169.26 kB |
src_main_webapp_app_account_account_module_ts.js                               | account-account-module                      | 157.15 kB |
src_main_webapp_app_admin_user-management_user-management_module_ts.js         | user-management-user-management-module      | 105.50 kB |
src_main_webapp_app_entities_siddhumicroservice_category_category_module_ts.js | siddhumicroservice-category-category-module |  70.24 kB |
src_main_webapp_app_admin_health_health_module_ts.js                           | health-health-module                        |  29.06 kB |
src_main_webapp_app_admin_configuration_configuration_module_ts.js             | configuration-configuration-module          |  25.48 kB |
src_main_webapp_app_admin_logs_logs_module_ts.js                               | logs-logs-module                            |  23.56 kB |
src_main_webapp_app_admin_gateway_gateway_module_ts.js                         | gateway-gateway-module                      |  22.61 kB |
src_main_webapp_app_login_login_module_ts.js                                   | login-login-module                          |  16.37 kB |
src_main_webapp_app_admin_docs_docs_module_ts.js                               | docs-docs-module                            |   4.73 kB |
src_main_webapp_app_admin_admin-routing_module_ts.js                           | admin-admin-routing-module                  |   4.46 kB |
src_main_webapp_app_entities_entity-routing_module_ts.js                       | entities-entity-routing-module              |   2.33 kB |
common.js                                                                      | common                                      |   2.09 kB |
 
Build at: 2022-06-23T13:06:36.084Z - Hash: b5dbb9fe8734153d - Time: 112799ms
 
./src/main/webapp/content/scss/vendor.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].rules[0].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[6].rules[1].use[0]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[6].rules[1].use[1]!./src/main/webapp/content/scss/vendor.scss - Warning: Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning
 
(2433:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
 
 
Congratulations, JHipster execution is complete!
Sponsored with <img draggable="false" role="img" class="emoji" alt="❤️" src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/svg/2764.svg">  by @oktadev.

4- Start the gatway using command mvnw

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
C:\STS-Workspace\jhipstermicroservice\siddhugateway>mvnw
 
2022-06-23 18:45:00.379 DEBUG 3516 --- [  restartedMain] jdk.event.security                       : X509Certificate: Alg:SHA1withRSA, Serial:50946cec18ead59c4dd597ef758fa0ad, Subject:CN=XRamp Global Certification Authority, O=XRamp Security Services Inc, OU=www.xrampsecurity.com, C=US, Issuer:CN=XRamp Global Certification Authority, O=XRamp Security Services Inc, OU=www.xrampsecurity.com, C=US, Key type:RSA, Length:2048, Cert Id:-952474086, Valid from:11/1/04, 10:44 PM, Valid until:1/1/35, 11:07 AM
2022-06-23 18:45:02.770  INFO 3516 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : The response status is 200
2022-06-23 18:45:02.802  INFO 3516 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 5
2022-06-23 18:45:02.917  INFO 3516 --- [  restartedMain] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 12
2022-06-23 18:45:02.940  INFO 3516 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1655990102924 with initial instances count: 2
2022-06-23 18:45:02.967  INFO 3516 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1655990102967, current=UP, previous=STARTING]
2022-06-23 18:45:02.967  WARN 3516 --- [  restartedMain] c.n.discovery.InstanceInfoReplicator     : Ignoring onDemand update due to rate limiter
2022-06-23 18:45:06.518  INFO 3516 --- [  restartedMain] com.siddhu.gateway.SiddhugatewayApp      : Started SiddhugatewayApp in 38.135 seconds (JVM running for 40.337)
2022-06-23 18:45:06.567  INFO 3516 --- [  restartedMain] com.siddhu.gateway.SiddhugatewayApp      :
----------------------------------------------------------
        Application 'siddhugateway' is running! Access URLs:
        Local:          http://localhost:8080/
        External:       http://192.168.56.1:8080/
        Profile(s):     [dev, api-docs]
----------------------------------------------------------
2022-06-23 18:45:06.567  INFO 3516 --- [  restartedMain] com.siddhu.gateway.SiddhugatewayApp      :
----------------------------------------------------------
        Config Server:  Connected to the JHipster Registry config server!
----------------------------------------------------------
2022-06-23 18:45:06.598 DEBUG 3516 --- [ugateway-task-1] t.j.c.liquibase.AsyncSpringLiquibase     : Liquibase has updated your database in 20197 ms
2022-06-23 18:45:06.598  WARN 3516 --- [ugateway-task-1] t.j.c.liquibase.AsyncSpringLiquibase     : Warning, Liquibase took more than 5 seconds to start up!
2022-06-23 18:45:06.896 DEBUG 3516 --- [actor-tcp-nio-2] d.m.r.mysql.client.ReactorNettyClient    : Response: HandshakeV10Request{header=HandshakeHeader{protocolVersion=10, serverVersion=8.0.29, connectionId=65}, salt=REDACTED, serverCapabilities=dfffffff, collationLow8Bits=-1, serverStatuses=2, authType=caching_sha2_password}
2022-06-23 18:45:07.135 DEBUG 3516 --- [actor-tcp-nio-2] d.m.r.mysql.client.ReactorNettyClient    : Request: SslRequest41{capabilities=12ffa0f, collationId=45}
2022-06-23 18:45:07.156 DEBUG 3516 --- [actor-tcp-nio-2] d.m.r2dbc.mysql.client.SslBridgeHandler  : SSL event triggered, enable SSL handler to pipeline
2022-06-23 18:45:08.023  INFO 3516 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SIDDHUGATEWAY/siddhugateway:58c397693c88d3

You can down load the source code from belwo location.
1- jhipster-registry
https://github.com/jhipster/jhipster-registry.git
2- jhipstermicroservice
https://github.com/shdhumale/siddhumicroservice.git
3- siddhugateway
https://github.com/shdhumale/siddhugateway.git

No comments: