Skip to content

Commit 2fe909f

Browse files
committed
fix: remove dashes in kafka configuration
1 parent 942e8aa commit 2fe909f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

generators/app/files.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,11 @@ function overrideMainGeneratorAppYml(generator) {
369369
const appYmlPath = `${jhipsterConstants.MAIN_DIR}docker/app.yml`;
370370

371371
const kafkaBootstrapServersPattern = /^\s.*KAFKA_BOOTSTRAPSERVERS.*$/gm;
372-
const kafkaBootstrapServers = ' - KAFKA_BOOTSTRAP_SERVERS=kafka:29092';
372+
const kafkaBootstrapServers = ' KAFKA_BOOTSTRAP_SERVERS: kafka:29092';
373373
generator.replaceContent(appYmlPath, kafkaBootstrapServersPattern, kafkaBootstrapServers);
374374

375375
const kafkaAdvertisedListenersPattern = /^\s.*KAFKA_ADVERTISED_LISTENERS.*$/gm;
376-
const kafkaAdvertisedListeners = ' - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092';
376+
const kafkaAdvertisedListeners = ' KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092';
377377
generator.replaceContent(appYmlPath, kafkaAdvertisedListenersPattern, kafkaAdvertisedListeners);
378378
}
379379

test/app.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,11 @@ function assertNoTopicName(applicationYml, testApplicationYml, entityName) {
10661066
}
10671067

10681068
function assertBootstrapServerProperties(bootstrapServers = constants.DEFAULT_BOOTSTRAP_SERVERS) {
1069-
const boostrapProps = `bootstrap.servers: \\\${KAFKA_BOOTSTRAP_SERVERS:${bootstrapServers}}`;
1069+
const bootstrapProps = `bootstrap.servers: \\\${KAFKA_BOOTSTRAP_SERVERS:${bootstrapServers}}`;
10701070

1071-
assert.fileContent(`${jhipsterConstants.SERVER_MAIN_RES_DIR}config/application.yml`, new RegExp(boostrapProps));
1071+
assert.fileContent(`${jhipsterConstants.SERVER_MAIN_RES_DIR}config/application.yml`, new RegExp(bootstrapProps));
10721072

1073-
assert.fileContent(`${jhipsterConstants.SERVER_TEST_RES_DIR}config/application.yml`, new RegExp(boostrapProps));
1073+
assert.fileContent(`${jhipsterConstants.SERVER_TEST_RES_DIR}config/application.yml`, new RegExp(bootstrapProps));
10741074
}
10751075

10761076
function assertThatKafkaPropertiesAreOrdered(applicationYml) {

test/templates/message-broker-with-entities-2nd-call/src/main/docker/app.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ services:
33
message_broker_with_entities-app:
44
image: message_broker_with_entities
55
environment:
6-
- _JAVA_OPTIONS=-Xmx512m -Xms256m
7-
- SPRING_PROFILES_ACTIVE=prod,swagger
8-
- MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
9-
- SPRING_DATASOURCE_URL=jdbc:mysql://message_broker_with_entities-mysql:3306/message_broker_with_entities?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
10-
- JHIPSTER_SLEEP=30 # gives time for other services to boot before the application
11-
- KAFKA_BOOTSTRAP_SERVERS=kafka:29092
6+
_JAVA_OPTIONS: -Xmx512m -Xms256m
7+
SPRING_PROFILES_ACTIVE: prod,swagger
8+
MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED: true
9+
SPRING_DATASOURCE_URL: jdbc:mysql://message_broker_with_entities-mysql:3306/message_broker_with_entities?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
10+
JHIPSTER_SLEEP: 30 # gives time for other services to boot before the application
11+
KAFKA_BOOTSTRAP_SERVERS: kafka:29092
1212
ports:
1313
- 8080:8080
1414
message_broker_with_entities-mysql:
@@ -20,8 +20,8 @@ services:
2020
file: kafka.yml
2121
service: kafka
2222
environment:
23-
- KAFKA_ADVERTISED_HOST_NAME=kafka
24-
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
23+
KAFKA_ADVERTISED_HOST_NAME: kafka
24+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
2525
zookeeper:
2626
extends:
2727
file: kafka.yml

0 commit comments

Comments
 (0)