diff --git a/build/classes/java/main/com/example/kafkaapp/KafkaApp.class b/build/classes/java/main/com/example/kafkaapp/KafkaApp.class deleted file mode 100644 index e883d20..0000000 Binary files a/build/classes/java/main/com/example/kafkaapp/KafkaApp.class and /dev/null differ diff --git a/build/classes/java/main/com/example/kafkaapp/service/KafkaConsumer.class b/build/classes/java/main/com/example/kafkaapp/service/KafkaConsumer.class deleted file mode 100644 index 62e3fc1..0000000 Binary files a/build/classes/java/main/com/example/kafkaapp/service/KafkaConsumer.class and /dev/null differ diff --git a/build/classes/java/main/com/example/kafkaapp/service/KafkaProducerConfig.class b/build/classes/java/main/com/example/kafkaapp/service/KafkaProducerConfig.class deleted file mode 100644 index c5ba6d8..0000000 Binary files a/build/classes/java/main/com/example/kafkaapp/service/KafkaProducerConfig.class and /dev/null differ diff --git a/build/classes/java/main/com/example/kafkaapp/service/ProducerService.class b/build/classes/java/main/com/example/kafkaapp/service/ProducerService.class deleted file mode 100644 index 06aa20f..0000000 Binary files a/build/classes/java/main/com/example/kafkaapp/service/ProducerService.class and /dev/null differ diff --git a/build/libs/java-2-0.0.1-SNAPSHOT-plain.jar b/build/libs/java-2-0.0.1-SNAPSHOT-plain.jar deleted file mode 100644 index daf1458..0000000 Binary files a/build/libs/java-2-0.0.1-SNAPSHOT-plain.jar and /dev/null differ diff --git a/build/libs/java-2-0.0.1-SNAPSHOT.jar b/build/libs/java-2-0.0.1-SNAPSHOT.jar deleted file mode 100644 index ee67a74..0000000 Binary files a/build/libs/java-2-0.0.1-SNAPSHOT.jar and /dev/null differ diff --git a/build/reports/problems/problems-report.html b/build/reports/problems/problems-report.html deleted file mode 100644 index d1f7fe7..0000000 --- a/build/reports/problems/problems-report.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - - - - - - - - Gradle Configuration Cache - - - -
- -
- Loading... -
- - - - - - diff --git a/build/resolvedMainClassName b/build/resolvedMainClassName deleted file mode 100644 index d4a1a2a..0000000 --- a/build/resolvedMainClassName +++ /dev/null @@ -1 +0,0 @@ -com.example.kafkaapp.KafkaApp \ No newline at end of file diff --git a/build/resources/main/application.yaml b/build/resources/main/application.yaml deleted file mode 100644 index 31f970b..0000000 --- a/build/resources/main/application.yaml +++ /dev/null @@ -1,20 +0,0 @@ -spring: - kafka: - bootstrap-servers: localhost:9093 - consumer: - group-id: kafka-spring-app-group - security: - protocol: SSL - ssl: - trust-store-location: file:/workspaces/java-2/kafka.pfx - trust-store-password: - trust-store-type: pkcs12 - key-store-location: file:/workspaces/java-2/kafka.pfx - key-store-password: - key-store-type: pkcs12 - key-password: - properties: - "ssl-endpoint-identification-algorithm": "" - producer: - key-serializer: org.apache.kafka.common.serialization.StringSerializer - value-serializer: org.apache.kafka.common.serialization.StringSerializer diff --git a/build/tmp/bootJar/MANIFEST.MF b/build/tmp/bootJar/MANIFEST.MF deleted file mode 100644 index 89ddc0c..0000000 --- a/build/tmp/bootJar/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: org.springframework.boot.loader.JarLauncher -Start-Class: com.example.kafkaapp.KafkaApp -Spring-Boot-Version: 3.0.4 -Spring-Boot-Classes: BOOT-INF/classes/ -Spring-Boot-Lib: BOOT-INF/lib/ -Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx -Spring-Boot-Layers-Index: BOOT-INF/layers.idx -Build-Jdk-Spec: 21 -Implementation-Title: java-2 -Implementation-Version: 0.0.1-SNAPSHOT - diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/KafkaApp.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/KafkaApp.class.uniqueId1 deleted file mode 100644 index 64c220d..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/KafkaApp.class.uniqueId1 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/KafkaConsumer.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/KafkaConsumer.class.uniqueId0 deleted file mode 100644 index 911fb62..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/KafkaConsumer.class.uniqueId0 and /dev/null differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index cd2d3e2..0000000 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and /dev/null differ diff --git a/build/tmp/jar/MANIFEST.MF b/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c0..0000000 --- a/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/docker-compose.yaml b/docker-compose.yaml index 46908cd..4a90e86 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -14,7 +14,7 @@ services: image: confluentinc/cp-kafka:7.9.0 container_name: kafka volumes: - - /workspaces/java-2/creds:/etc/kafka/secrets/ + - /workspaces/bad-java/creds:/etc/kafka/secrets/ depends_on: - zookeeper environment: diff --git a/src/main/java/com/example/kafkaapp/service/ProducerService.java b/src/main/java/com/example/kafkaapp/service/ProducerService.java index a780aff..a76eb09 100644 --- a/src/main/java/com/example/kafkaapp/service/ProducerService.java +++ b/src/main/java/com/example/kafkaapp/service/ProducerService.java @@ -27,33 +27,3 @@ public class ProducerService { } } - -@Configuration -class KafkaProducerConfig { - - @Bean - public ProducerFactory producerFactory() { - Map props = new HashMap<>(); - props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9093"); - props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class); - props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class); - props.put("security.protocol", "SSL"); - props.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, "/workspaces/java-2/kafka.pfx"); - props.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, ""); - props.put(SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, "/workspaces/java-2/kafka.pfx"); - props.put(SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, ""); - props.put(SslConfigs.SSL_KEYSTORE_TYPE_CONFIG, "PKCS12"); - props.put(SslConfigs.SSL_KEY_PASSWORD_CONFIG, ""); - - // ✅ Disable hostname verification (the "single extra property") - props.put(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, ""); - props.put("ssl.endpoint.identification.algorithm", ""); - - return new DefaultKafkaProducerFactory<>(props); - } - - @Bean - public KafkaTemplate kafkaTemplate() { - return new KafkaTemplate<>(producerFactory()); - } -} \ No newline at end of file diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 31f970b..73cfe07 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -6,10 +6,10 @@ spring: security: protocol: SSL ssl: - trust-store-location: file:/workspaces/java-2/kafka.pfx + trust-store-location: file:/workspaces/bad-java/creds/kafka.pfx trust-store-password: trust-store-type: pkcs12 - key-store-location: file:/workspaces/java-2/kafka.pfx + key-store-location: file:/workspaces/bad-java/creds/kafka.pfx key-store-password: key-store-type: pkcs12 key-password: