2
我有一种情况。我正在用kie-spring测试一堆.drl文件。只有当DRL文件位于src/test/resources文件夹中而不在src/main/resources /文件夹中时,才会查找/扫描DRL文件。Drools --- JUnit测试 - Drools Spring不扫描源文件夹中的包
我甚至将drl文件和kie-spring .xml文件一起移动到一个单独的jar项目/文件中,放入src/main/resources文件夹中。仍然没有运气!以下是我得到的警告!
2014-09-30 15:24:51,227 [AbstractKieModule] [main] WARN未找到KieBase MASTRT_KBase的文件,正在搜索文件夹\ Users \ mmadhavan.FACS_ORG \ workspace \ org.ncdb.facs.measures \ target \ test -plasses
以下是我的xml文件!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:kie="http://drools.org/schema/kie-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd">
<kie:kmodule id="kbase_inlist_op_test_rules">
<kie:kbase name="MASTRT_KBase" packages="org.xxx.xxx.xxxxx.drl.cancer.MASTRT">
<kie:ksession name="MASTRT_KSession" type="stateless" scope="prototype"/>
</kie:kbase>
</kie:kmodule>
<bean id="kiePostProcessor" class="org.kie.spring.annotations.KModuleAnnotationPostProcessor"/>
</beans>