Maven 例外情况;无法解析ObjectType';产品'&引用;

Maven 例外情况;无法解析ObjectType';产品'&引用;,maven,drools,dsl,Maven,Drools,Dsl,这个问题解决了,但是主类规则中的。但drl文件尚未形成 package com.sample; import com.model.example.Product.*; expander product.dsl rule "success" when There is a Product that -has price greater than 100 -has quantity less than 2 -has category equal to

这个问题解决了,但是主类规则中的。但drl文件尚未形成

package com.sample;
import com.model.example.Product.*;
expander product.dsl

rule "success"
when 
     There is a Product that 
     -has price greater than 100 
     -has quantity less than 2 
     -has category equal to 'grocery'
then
    success
end
在我创建dsl和dslr文件的maven项目中,我遇到了一个异常“无法解析ObjectType‘Product’”

rule "failure"
when 
    There is a Product that 
    -has price less than 100 
    -has quantity greater than 2
    -has category equal to 'medicine'
then
    fail
end    

DRL import语句的工作原理与Java中的相同。因此,导入后面跟着完整的类名:

import com.model.example.Product;