2
異なる環境で簡単に管理できるように、データベーステーブルにコンフィグレーションプロパティを格納する方がよい。 XMLベースの設定でデータベーステーブルから構成プロパティを格納および取得するためのアプローチは、以下のようなものです:Javaベースのコンフィグレーションを使用するSpringベースのアプリケーションのデータベースからのアプリケーションコンフィグレーションプロパティのロード
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="properties">
<bean class="org.apache.commons.configuration.ConfigurationConverter" factory-method="getProperties">
<constructor-arg>
<bean class="org.apache.commons.configuration.DatabaseConfiguration">
<constructor-arg>
<ref bean="dbDataSource" />
</constructor-arg>
<constructor-arg value="DOMAIN_CONFIG" />
<!-- DB Table -->
<constructor-arg value="CONFIG_NAME" />
<!-- DB Key Column -->
<constructor-arg value="CONFIG_VALUE" />
<!-- DB Value Column -->
</bean>
</constructor-arg>
</bean>
</property>
</bean>
しかし、私は、Javaベースの構成が、運を使用して達成しようとしている同じ事。 誰でも助けてくれますか?
あなたのsolutıonを完全なソースとして要点として投稿してください。私はCommonsConfigurationFactoryBeanとDatabaseConfigurationクラスを投稿されたソルーションにすることはできません – simpleusr