All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spring.env.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Cloud Foundry
    Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved.

    This product is licensed to you under the Apache License, Version 2.0 (the "License").
    You may not use this product except in compliance with the License.

    This product includes a number of subcomponents with
    separate copyright notices and license terms. Your use of these
    subcomponents is subject to the terms and conditions of the
    subcomponent's license, as noted in the LICENSE file.

-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

    <bean id="applicationProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="propertiesArray">
        <list>
            <ref bean="platformProperties"/>
            <bean class="org.cloudfoundry.identity.uaa.impl.config.EnvironmentPropertiesFactoryBean" />
        </list>
        </property>
    </bean>

    <context:property-placeholder properties-ref="applicationProperties" />

    <context:mbean-server id="mbeanServer" />

    <context:mbean-export server="mbeanServer" default-domain="spring.application" registration="replaceExisting" />


    <bean class="org.springframework.jmx.export.MBeanExporter">
        <property name="server" ref="mbeanServer" />
        <property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
        <property name="beans">
            <map>
                <entry key="spring.application:type=Config,name=uaa" value-ref="&amp;config" />
            </map>
        </property>
        <property name="assembler">
            <bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler">
                <property name="methodMappings">
                    <map>
                        <entry key="spring.application:type=Config,name=uaa" value="getObject" />
                    </map>
                </property>
            </bean>
        </property>
    </bean>

    <bean id="config" class="org.cloudfoundry.identity.uaa.impl.config.EnvironmentMapFactoryBean" />

    <bean id="scriptsversion" class="java.lang.String">
        <constructor-arg value="1.5.2" />
    </bean>

    <bean id="scripts" class="java.lang.String">
        <constructor-arg ref="platform" />
    </bean>

    <bean id="uaaDatabaseName" class="org.cloudfoundry.identity.uaa.db.UaaDatabaseName">
        <constructor-arg value="#{ systemProperties['org.gradle.test.worker'] }" />
    </bean>

    <beans profile="default,hsqldb">
        <description>Profile for hsqldb scripts on an empty database</description>
        <util:properties id="platformProperties">
            <prop key="database.driverClassName">org.hsqldb.jdbcDriver</prop>
            <prop key="database.url">jdbc:hsqldb:mem:uaadb</prop>
            <prop key="database.username">sa</prop>
            <prop key="database.password"></prop>
        </util:properties>
        <bean id="platform" class="java.lang.String">
            <constructor-arg value="hsqldb" />
        </bean>

        <bean id="validationQuery" class="java.lang.String">
            <constructor-arg value="select 1 from information_schema.system_users" />
        </bean>
        <bean id="limitSqlAdapter" class="org.cloudfoundry.identity.uaa.resources.jdbc.HsqlDbLimitSqlAdapter"/>

    </beans>

    <beans profile="postgresql">
        <description>Profile for postgresql scripts on an existing database</description>
        <util:properties id="platformProperties">
            <prop key="database.driverClassName">org.postgresql.Driver</prop>
            <prop key="database.url">#{ 'jdbc:postgresql:' + uaaDatabaseName.getName() }</prop>
            <prop key="database.username">root</prop>
            <prop key="database.password">changeme</prop>
        </util:properties>
        <bean id="platform" class="java.lang.String">
            <constructor-arg value="postgresql" />
        </bean>
        <bean id="validationQuery" class="java.lang.String">
            <constructor-arg value="select 1" />
        </bean>
        <bean id="limitSqlAdapter" class="org.cloudfoundry.identity.uaa.resources.jdbc.PostgresLimitSqlAdapter"/>
    </beans>

    <beans profile="mysql">
        <description>Profile for mysql scripts on an existing database</description>
        <util:properties id="platformProperties">
            <prop key="database.driverClassName">org.mariadb.jdbc.Driver</prop>
            <prop key="database.url">#{ 'jdbc:mysql://127.0.0.1:3306/' + uaaDatabaseName.getName() + '?useSSL=true&amp;trustServerCertificate=true' }</prop>
            <prop key="database.username">root</prop>
            <prop key="database.password">changeme</prop>
        </util:properties>
        <bean id="platform" class="java.lang.String">
            <constructor-arg value="mysql" />
        </bean>
        <bean id="validationQuery" class="java.lang.String">
            <constructor-arg value="select 1" />
        </bean>
        <bean id="limitSqlAdapter" class="org.cloudfoundry.identity.uaa.resources.jdbc.MySqlLimitSqlAdapter"/>
    </beans>

    <beans profile="sqlserver">
        <description>Profile for SQL Server scripts on an existing database</description>
        <util:properties id="platformProperties">
            <prop key="database.driverClassName">com.microsoft.sqlserver.jdbc.SQLServerDriver</prop>
            <prop key="database.url">#{ 'jdbc:sqlserver://localhost:1433;database=' + uaaDatabaseName.getName() + ';' }</prop>
            <prop key="database.username">root</prop>
            <prop key="database.password">changemeCHANGEME1234!</prop>
        </util:properties>
        <bean id="platform" class="java.lang.String">
            <constructor-arg value="sqlserver" />
        </bean>
        <bean id="validationQuery" class="java.lang.String">
            <constructor-arg value="select 1" />
        </bean>
        <bean id="limitSqlAdapter" class="org.cloudfoundry.identity.uaa.resources.jdbc.SQLServerLimitSqlAdapter"/>
    </beans>

    <beans profile="empty">
        <description>Profile for testing the postgresql scripts on an empty database</description>
    </beans>

</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy