弹簧并连接到 AS400
我正在尝试使用 spring 连接到 AS400,但我没有运气。 我想知道是否可以使用类 AS400JDBCConnectionPoolDataSource 在 spring 中设置默认架构?
这是我正在使用的 spring 配置
谢谢 达米安
I am trying to connect to AS400 using spring but I am having no luck.
I was wondering is it possible to set the default schema in spring using the class AS400JDBCConnectionPoolDataSource?
here is the spring configuration I am using
<bean id="DataSource" class="com.ibm.as400.access.AS400JDBCConnectionPoolDataSource">
<property name="serverName"><value>tradingdev.url.com</value></property>
<property name="user"><value>user</value></property>
<property name="password"><value>password</value></property>
<property name="dataTruncation"><value>false</value></property>
<property name="naming"><value>sql</value></property>
<property name="errors"><value>full</value></property>
<property name="trace"><value>false</value></property>
</bean>
Thanks
Damien
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是 Spring 问题,但指定默认架构的方法如下:
您必须将
libraries
属性设置为默认库(libraires 可以视为 as400 术语中的架构)。对于 as400,这有两种工作方式,具体取决于naming
属性的设置方式。如果naming
设置为“sql”(如您的配置中所示),则libraries
值仅采用一个值,并被视为默认架构。如果将naming
属性设置为“system”,则可以指定逗号分隔的库列表:表和其他对象名称将按照列表中指定的顺序进行解析。It is not a Spring issue, but here's how to specify the default schema:
You must set the
libraries
property to the default library (libraires can be see as schemas in as400 terminology). This works in 2 ways with as400, depending on how thenaming
property is set. Ifnaming
is set to 'sql' (as in your config), thelibraries
value only takes one value and is considered as the default schema. If you set thenaming
property to 'system', then you can specify a comma separated library list: tables and other objects names are resolved in the order specified in the list.