How can I comment the 'driverClassName' line and update org.quartz.threadPool.threadCount to 200
In the YAML snippet below, using python (PyYAML package)?
PRODUCT_HOME: /app
config:
active-profiles: mysql,oauth2
driverClassName: com.mysql.cj.jdbc.Driver
datasourceurl: jdbc:h2:file:./data
datasourceuser: sa
spring:
quartz:
job-store-type: jdbc
enabled: true
properties:
org.quartz.threadPool.threadCount: 50
PyYAML cannot add comments. It actually removes all comments on loading, so in general PyYAML is not the appropriate tool for YAML documents that need further human interaction (which I assume is the reason for adding a comment).
You should do this with
ruamel.yaml
(disclaimer: I am the author of that package):which gives: