Ø 前言
为了增强系统的稳定性,降低系统内各系统的耦合,所以Hams档案管理系统将消息服务器和数据源的部署方式进行修改,可以异步部署,增大系统灵活性,支持数据库连接数配置!
Ø 配置
增加功能需要在Lams包里面进行配置,【lams.war】→【WEB-INF】→【classes】→【config】找到文件【jdbc.properties】,如下是此文件未改动之前和改动之后的代码(只以oracle数据库为例)!
改动之前:
#datasource
jdbc.jndiName=java:DataSource
sqlserverSchemaName=dbo
############################JDBC#############################
#ora
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@localhost:1521:orcl
jdbc.username=wangxf
jdbc.password=ams2000
改动之后:
#datasource
druid.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
druid.datasource.username=wanXXXX
druid.datasource.password=ams2000
# rabbitmq
rabbitmq.host=localhost
rabbitmq.username=guest
rabbitmq.password=guest
# default
druid.datasource.name=DataSource
druid.datasource.filters=stat
druid.datasource.maxActive=60
druid.datasource.initialSize=1
druid.datasource.maxWait=60000
druid.datasource.minIdle=1
druid.datasource.timeBetweenEvictionRunsMillis=60000
druid.datasource.minEvictableIdleTimeMillis=300000
druid.datasource.validationQuery=SELECT 'x'
druid.datasource.testWhileIdle=true
druid.datasource.testOnBorrow=false
druid.datasource.testOnReturn=false
druid.datasource.poolPreparedStatements=false
druid.datasource.maxOpenPreparedStatements=20
druid.datasource.slowSqlMillis=5000
druid.datasource.isLogSlowSql=true
sqlserverSchemaName=dbo