弹簧并连接到 AS400

发布于 2024-10-20 23:46:23 字数 664 浏览 10 评论 0原文

我正在尝试使用 spring 连接到 AS400,但我没有运气。 我想知道是否可以使用类 AS400JDBCConnectionPoolDataSource 在 spring 中设置默认架构?

这是我正在使用的 spring 配置<属性名称=“服务器名称”><值>tradingdev.url.com <属性名称=“用户”><值>用户 <属性名称=“密码”><值>密码 <属性名称=“dataTruncation”><值>假 <属性名称=“命名”><值>sql <属性名称=“错误”><值>完整 <属性名称=“跟踪”><值>假

谢谢 达米安

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

平定天下 2024-10-27 23:46:23

这不是 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 the naming property is set. If naming is set to 'sql' (as in your config), the libraries value only takes one value and is considered as the default schema. If you set the naming 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文