Giter Club home page Giter Club logo

spring-drools-demo's Introduction

spring-drools-demo

spring与drools结合的一个小例子,规则引擎的使用。解决小明喝汽水问题

为了以后扩展方便,我还是做成了一个maven工程和一个maven模块的目录结构。

与spring进行整合,使用起来更加方便。

问题描述:

1、小明手上有50元钱;

2、1元钱可以买一瓶饮料;

3、2个空瓶可以兑换一瓶饮料;

4、问题是:最终小明可以喝多少瓶饮料;

至于什么是drools,什么是业务规则引擎,请自行查阅相关资料。

项目基于JDK1.6+,maven环境,drools的相关jar的版本为5.2.0.Final

QQ:251607355 email:airfey#126.com (请把#换成@)

详细的程序逻辑请参照wiki内文章以及后续更新

欢迎一起参与完善。

2014.1.21 changes

新增高尔夫推理题,题意描述如下:

  1. 四个高尔夫选手从左向右排成一排, 站在树下. 每个选手穿着不通颜色的裤子.
    其中一个穿红色.
    在Fred右边的一个选手穿蓝色.
  2. Joe在队列中排第二.
  3. Bob穿着彩色格呢的裤子.
  4. Tom不在第一或者第四, 他没有穿那种让人恶心的桔黄色裤子.

那么, 问题是, 这四个人在队列中的顺序是什么? 他们各自穿什么颜色的裤子?

使用drools的解法请参考本例中的单元测试。

spring-drools-demo's People

Contributors

airfey avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.