For the master batch, batch modify text format unchanged, but multiple modificat

hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
hibernate.show_sql=false

#
# oracle for normal product database
#
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@192.168.0.244:1521:orcl
jdbc.username=123
jdbc.password=222

#
# oracle for report which should not query product database
#
I want to modify the jdbc.url, jdbc.username, jdbc.password after the equal sign value, the same format requirements. Modified value is uncertain, but also can be configured. I wrote several times without success, please God help...

Started by Duncan at December 26, 2016 - 12:26 PM

Sed fix, you Linux?

sed -i 's,^jdbc.username.*,jdbc.username='"${username}"',g' file

The file value in the configuration file to your class capacity, ${username} is a variable
Several other similar

Posted by Bruno at December 29, 2016 - 1:06 PM

Recommended Python ConfigParser module, special analysis and editing the properties file

Posted by Colby at January 04, 2017 - 1:43 PM