The quickstart consists of two modules:
Client runs the UI and sends requests to the Solver Server via ActiveMQ.
Solver Server optimizes the requests sent via an ActiveMQ queue and sends results back to ActiveMQ broker.
Git clone the optaplanner-quickstarts repo:
$ git clone https://github.com/kiegroup/optaplanner-quickstarts.git
...
$ cd optaplanner-quickstarts/technology/java-activemq-quarkus
Build the project:
$ mvn clean install
Install docker and docker-compose.
Start the ActiveMQ broker, the Solver Server, and Client application with the run.sh
script, which starts all 3 processes:
$ ./run.sh
Visit http://localhost:8080 in your browser.
Click on the Solve button.
In case of any error, please check the log files located in java-activemq-quarkus/target
.
Then try live coding:
Make some changes in the source code.
Refresh your browser (F5).
Notice that those changes are immediately in effect.
When you’re done iterating in quarkus:dev
mode, run the application as a conventional jar file.
Before running any application, start the ActiveMQ broker:
$ docker-compose up
Compile it with Maven:
$ cd solver
$ mvn package -DskipTests
Run it:
$ java -Dquarkus.http.port=8081 -jar ./target/quarkus-app/quarkus-run.jar
Note
|
Use the custom port to avoid conflict with the Client application. |
Compile it with Maven:
$ cd client
$ mvn package -DskipTests
Run it:
$ java -jar ./target/quarkus-app/quarkus-run.jar
Visit http://localhost:8080 in your browser.
Compile the Solver Server application natively:
$ cd solver
$ mvn package -Dnative -DskipTests
Run the native executable:
$ ./target/*-runner -Dquarkus.http.port=8081
Compile the Client application natively:
$ cd client
$ mvn package -Dnative -DskipTests
Run the native executable:
$ ./target/*-runner
Visit http://localhost:8080 in your browser.
Visit www.optaplanner.org.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。