将org.springframework.test包添加到netbeans中的spring-2.5.6-SEC01.jar中

发布于 2024-10-10 07:24:11 字数 582 浏览 0 评论 0原文

这可能非常简单,但我无法让它发挥作用。我想使用 org.springframework.test 包中的 AbstractDependencyInjectionSpringContextTest 类。 Netbeans的spring库中不包含这个包,所以我想添加它。所以到目前为止我尝试过的是:

  • 将“test”目录(从 spring 下载)复制并粘贴到 Netbeans 的 spring-2.5.6-SEC01.jar 文件中(将其复制到该 jar 中的 org.springframework 目录,以便我可以使用 org.springframework.test 导入它)。如果我转到 Netbeans 中的项目/库,它就在那里,但是当我尝试导入 org.springframework.test.*; 时自动编译没有给我从 org.soringframework 包中选择测试目录的选项。

  • 创建一个指向“test”目录的新库并将其添加到项目中 - 因为“test”中没有任何 jar 文件,我不确定应该使用什么路径来导入它。

我很确定这是非常简单的事情,但我仍然是新手,无法弄清楚。

This is probably very simple, however I can't get this to work. I want to use AbstractDependencyInjectionSpringContextTest class which is in org.springframework.test package. This package is not included in Netbeans' spring library, so I want to add it. So what I have tried so far is:

  • copy and paste "test" directory (downloaded from spring) into the Netbeans' spring-2.5.6-SEC01.jar file (copy it to org.springframework directory in that jar so I can use org.springframework.test to import it). If I go to project/libraries in Netbeans it is there, but when I try to import org.springframework.test.*; the autocomplition doesn't give me the option to choose test directory from org.soringframework package.

  • create a new library which points to "test" directory and add it to the project- as there is no any jar file in "test" I'm not sure what path should I use to import it.

I'm pretty sure this is something very simple but I'm still a novice and can't figure this out.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

娜些时光,永不杰束 2024-10-17 07:24:11

根据grepcodespring-2.5.6-SEC01.jar 中不包含测试包。您需要下载 spring-test-2.5.6。 SEC01.jar

According to grepcode, the test package is not included in spring-2.5.6-SEC01.jar. You need to download spring-test-2.5.6.SEC01.jar.

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