adm/app 계정 관련 하이버네이트 대응
This commit is contained in:
@@ -113,5 +113,13 @@
|
||||
<prop key="hibernate.bytecode.use_reflection_optimizer">false</prop>
|
||||
|
||||
<prop key="hibernate.integration.envers.enabled">false</prop>
|
||||
|
||||
<prop key="hibernate.multiTenancy">SCHEMA</prop>
|
||||
<prop key="hibernate.multi_tenant_connection_provider">
|
||||
com.eactive.eai.rms.data.config.ConfigurableMultiTenantConnectionProvider
|
||||
</prop>
|
||||
<prop key="hibernate.tenant_identifier_resolver">
|
||||
com.eactive.eai.rms.data.config.TenantIdentifierResolver
|
||||
</prop>
|
||||
</util:properties>
|
||||
</beans>
|
||||
-4
@@ -53,10 +53,6 @@ public class ConfigurableMultiTenantConnectionProvider implements MultiTenantCon
|
||||
}
|
||||
|
||||
public Connection changeSchema(Connection connection, String tenantIdentifier) throws SQLException {
|
||||
// connection.setSchema() 를 이용하여 schema를 설정 하려 했으나 postgresql 에서는 대문자로 넣으면 에러가
|
||||
// 발생 한다. 에러가 발생 하지 않게 하려면 applicationContext-datasource.xml 에서 스키마명을 소문자로 변경
|
||||
// 한다.
|
||||
// 일단 schema 설정을 하지 않고 사용
|
||||
String schema = DataSourceTypeManager.getDataSourceType(tenantIdentifier).getSchema();
|
||||
connection.setSchema(schema);
|
||||
log.debug("change schema : {} connection : {}", schema, connection);
|
||||
|
||||
Reference in New Issue
Block a user