Skip to content

Latest commit

 

History

History

springboot-multi-modules

Springboot multi module example

Purpose

This project showcases how to organise a multi-module project with Jeka and especially a project integrating Springboot with pure client web application. It also demonstrates how to share common build features amongs multiple modules and how to drive the whole build.

Note : This is not the only way to organize multi-module projects :

  • It's possible to have a "master" module at the same level than the other modules.
  • It's not necessary to have a 'build-common' module. It's possible to define the common builds into module 'utils' for example.

Commands

Build all :

jeka cleanPack

Run :

jeka run

You can request a formula computation via rest API.

You can also display in browser the Hello World Javascript application.

What is inside ?

This project contains two applications providing the same functionality : compute a magic formula according an input number. One application is a standalone Swing application while the other is web2 application powered by Springboot.

The formula computation is provided by core modules that in turns depends on utils as described below.

map

  • core : Library that actually compute the "magic formula". It uses in turn the utils lib to accomplish some parts of the computing.

  • swingapp : Standalone swing application exposing magic formula. Jeka produces a fat jar containing all needed dependencies.

  • springbootapp : Springboot application exposing magic formula. Jeka triggers client part (web) build to include it in springbootapp.jar

  • web : Web graphical interface embedded in springbootapp. This is a pure web project, built with node.js/npm/webpack without any trace of Jeka.

  • build-master : Contains only Jeka commands to trigger overall build.

  • build-common : Contains common build code used by all other modules. Note that this could have also been included in the utils module, which is the most downstream module, instead of inside a specific one.