Spring Boot 无法创建Drools kieContainer

66bbxpm5  于 2023-02-04  发布在  Spring
关注(0)|答案(1)|浏览(467)

我正试着按照同样的步骤来做这件事
Spring Boot Drools Rule Engine Example
但是我在编译时遇到了这个错误:
Error creating bean with name 'kieContainer' defined in class path resource [.../DroolsConfig.class]: Failed to instantiate [org.kie.api.runtime.KieContainer]: Factory method 'kieContainer' threw exception with message: Cannot invoke "org.drools.compiler.compiler.Dialect.getBuilder(java.lang.Class)" because the return value of "org.drools.compiler.rule.builder.RuleBuildContext.getDialect()" is null ...................
这些是添加到我的pom.xml中的依赖项

<groupId>org.drools</groupId>
            <artifactId>drools-core</artifactId>
            <version>8.33.0.Final</version>
        </dependency>

        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-compiler</artifactId>
            <version>8.33.0.Final</version>
        </dependency>

        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-decisiontables</artifactId>
            <version>8.33.0.Final</version>
        </dependency>```

I'm using spring boot 3

Thank you for your help!

I'm using java Records instead of normal class
ssm49v7z

ssm49v7z1#

我通过将此依赖项添加到pom.xml来修复它

<dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-mvel</artifactId>
            <version>version...</version>
</dependency>

相关问题