大佬教程收集整理的这篇文章主要介绍了Spring – 来自其他Jar的存储库为null.如何初始化?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个项目在一个项目中进行数据访问,并在另一个项目中用作spring jar.我使用gradle maven-publish插件创建了jar.我在我的其他项目测试用例中初始化了这个Jar
@ContextConfiguration(LOCATIOns = {"classpath*:spring-config.xml"})
@transactional
public class TenantProvisioningManagerTest extends AbstractTestNGSpringContextTests {}
使用存储库的类.我这样用过
public class TenantProvisioningManager {
private static final Logger logger = LogManager.getLogger(TenantProvisioningManager.class);
@Autowired
TProductRepository tProductRepository;
}
存储库在这里为空.如何在这个单独的项目中从其他jar初始化存储库?
http://www.springframework.org/scheR_932_11845@a/beans" xmlns:xsi="http://www.w3.org/2001/XMLscheR_932_11845@a-instance" xmlns:tx="http://www.springframework.org/scheR_932_11845@a/tx" xmlns:context="http://www.springframework.org/scheR_932_11845@a/context" xmlns:jpa="http://www.springframework.org/scheR_932_11845@a/data/jpa" xsi:scheR_932_11845@aLOCATIOn="http://www.springframework.org/scheR_932_11845@a/beans
http://www.springframework.org/scheR_932_11845@a/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
">
stemEnvironment['GRADLE_USER_HOME']}/gradle.properties"/>
以上是大佬教程为你收集整理的Spring – 来自其他Jar的存储库为null.如何初始化?全部内容,希望文章能够帮你解决Spring – 来自其他Jar的存储库为null.如何初始化?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。