Large files can throw YAMLException due to node limits

Đang mở
#844 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, spring
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với org.springframework.beans.factory.config.YamlPropertiesFactoryBean và org.springframework.cloud.consul.config.ConsulPropertySource, sau đó so sánh đường dẫn tải YAML của chúng với OriginTrackedYamlLoader đã được sửa. Kiểm tra cách org.yaml.snakeyaml.LoaderOptions được cấu hình. Được xem là hoàn tất khi cấu hình YAML Consul lớn có thể ghi đè các giới hạn node liên quan hoặc sử dụng một YamlProcessor tùy chỉnh mà không gặp YAMLException.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

waiting-for-triage

Is your feature request related to a problem? Please describe.
Same problem as mentioned in https://github.com/spring-projects/spring-boot/issues/23096. When loading large yaml config from consul it ends up wtih org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50.

This was fixed for org.springframework.boot.env.OriginTrackedYamlLoader but is still problem in org.springframework.beans.factory.config.YamlPropertiesFactoryBean that is used by org.springframework.cloud.consul.config.ConsulPropertySource

Describe the solution you'd like
Provide a way to override the settings in org.yaml.snakeyaml.LoaderOptions or use custom org.springframework.beans.factory.config.YamlProcessor in org.springframework.cloud.consul.config.ConsulPropertySource.

Ngôn ngữ chính
Java
Star
821
Fork
540
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của spring-cloud/spring-cloud-consul

Tất cả issue của spring-cloud/spring-cloud-consul

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.