This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.ByteBuffer; | |
import java.util.Base64; | |
import java.util.UUID; | |
public class Base64ToUUID { | |
// Method to convert UUID to base64 (without padding) | |
public static String uuidToBase64(UUID uuid) { | |
ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[16]); | |
byteBuffer.putLong(uuid.getMostSignificantBits()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metricOperations.increment(KafkaMetrics.METRIC_NAME, | |
Tags.of(KafkaTags.topic(topic), | |
KafkaTags.exception(exception.getClass().getName()), | |
KafkaTags.processor(context.applicationId()) | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequiredArgsConstructor | |
@Component | |
public class MetricOperations { | |
private final MeterRegistry meterRegistry; | |
public Counter counter(String metricName, Tags tags) { | |
return meterRegistry.counter(metricName, tags); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>3.0.6</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.effectivedev.iban.ibantest; | |
import java.math.BigInteger; | |
import java.time.LocalDate; | |
import java.util.Map; | |
import java.util.TreeMap; | |
public class IbanService { | |
Map<String, IbanStructure> structures = new TreeMap<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.openapitools</groupId> | |
<artifactId>openapi-generator-maven-plugin</artifactId> | |
<!-- RELEASE_VERSION --> | |
<version>6.2.1</version> | |
<!-- /RELEASE_VERSION --> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generate</goal> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>build-helper-maven-plugin</artifactId> | |
<version>3.2.0</version> | |
<executions> | |
<execution> | |
<id>add-source</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>add-source</goal> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
cloud: | |
stream: | |
kafka: | |
binder: | |
brokers: localhost:9092 | |
autoCreateTopics: true | |
configuration: | |
sasl.mechanism: PLAIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
cloud: | |
stream: | |
poller: | |
fixedDelay: 100 | |
max-messages-per-poll: 100 | |
default: | |
content-type: application/*+avro | |
producer: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class PartitionExampleConfiguration { | |
@Bean | |
public Function< | |
KStream<String, ExampleValue>, KStream<String, ExampleValue>> transform() { | |
return kstream -> kstream.selectKey((key, value) -> value.getSomeProperty()); | |
} | |
} |
NewerOlder