How to prevent Spring Boot from parsing YAML keys with dots -


I have a YAML configuration file with a map of properties:

  Properties: ABC: 1  

The boot will parse it as:

  {A: {B: {c: 1}}}  

However, what do I need:

  {'ABC': 1}  

Is it anyway to pass key mode? It does not help to quote the key.


Update

Below the actual example.

Java

YAML

application.yml :

  Hadoop: Properties: fs.defaultFS: HDFS: // Local Host: 8020 mapred.job.tracker: Local Host: 8021  

Result

Calling ToString () as a result on the object:

HadoopProperties (property = {FS = {defaultFS = HDFS: // local host: 8020}, mapred = {job = {tracker = Local Host: 8021}}}}}

I see it. Because you are bound to a very normal object, so Spring thinks boot that your term separators map key dereferences that you will be connected to a map or property?


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -