전체 글(1000)
-
in the new schema has no default value and is missing in the old schema
신규 컬럼 추가시, 과거 자료를 위해서 default값 지정 필요{ "type": "record", "name": "TEST", "namespace": "com.example.kafka", "fields": [ { "name": "a", "type": "int" }, { "name": "b", "type": "string" }, { "name": "c", "type": "string" }, { "name": "ip", "type": "string", "default": "" }, // ✅ Add default { "name": "xforwardedfor", "type": "string", "default": "" }, // ✅ Add default { "name..
2025.03.14 -
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "charSequence" is null
null 처리 필요 // Normalize to plain String for STRING fields if (field.schema().getType() == Schema.Type.STRING) { fieldValue = fieldValue != null ? fieldValue.toString() : ""; }
2025.03.14 -
org.apache.avro.SchemaParseException: Illegal character in: x-forwarded-for
In Avro schema field names, you cannot use hyphens (-) or special characters.
2025.03.14 -
Cors 에러 처리
@Configurationpublic class CorsConfig { @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("http://127.0.0.1:5500") // Match your HTML server address .allowedMethods(..
2025.03.14 -
Live Server 사용
Install Live Server Extension in VSCode.Right-click on index.html and "Open with Live Server".Now access your page via http://127.0.0.1:5500/index.html (or similar).Fetch will work properly as the page is served over HTTP.
2025.03.14 -
Avro 설정
pom.xml io.confluent kafka-avro-serializer 7.5.1 org.apache.avro avro 1.11.1 confluent https://packages.confluent.io/maven/ application.ymlspring: kafka: bootstrap-servers: {접속정보} # Non-Avro Kafka Producer producer: key-serializer: org.apache.kafka.common.serialization.StringSerializer value-serializer: ..
2025.03.14