数据库连接使用JNDI
为什么要用JNDI?
简单说,属于配置式,可以通用。
路径:data-integration\simple-jndi\jdbc.properties
基本格式
live_logging_info/type=javax.sql.DataSource
live_logging_info/driver=org.postgresql.Driver
live_logging_info/url=jdbc:postgresql://localhost:5432/hibernate?searchpath=pentaho_dilogs
live_logging_info/user=hibuser
live_logging_info/password=password
MySQL配置
kettle_test/type=javax.sql.DataSource
kettle_test/driver=com.mysql.cj.jdbc.Driver
kettle_test/url=jdbc:mysql://localhost:3306/kettle_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
localhost/user=root
localhost/password=root@12345