abitgen / spring-projects Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
After migration to composite build. I was unable to run the spring application present in modules by executing main method.
Composite builds in gradle mean that an already working gradle project can be used as dependency within our own project.
The main difference between a multi module project and composite build project is there is a single project build in a multi module build, i.e, only one root build.gradle and settings.gradle file, however in case of composite builds existing gradle projects can be imported from the gradle menu available in Intellij idea, making the project is completely independent at the same time imports as modules, if required these modules can be added as dependencies to our project.
More on using Composite builds is here
https://blog.jetbrains.com/idea/2017/03/webinar-recording-composite-builds-with-gradle
This module should be responsible for having only the html views & templates.
Add as dependency to the library-management-application module
Create a SubProject "spring-boot-start" having the gradle configuration from the spring-initializer. To create a subproject, right click the root project and select new module, select gradle module and proceed.
Create allprojects block in the gradle file. Move dependencies, configurations to this block, so it is available to all the sub-projects, and itself under it.
And apply needed plugins for use in sub-projects.
Including the projects in settings.gradle file located at root location.
As spring-boot-start
module is now a separate project in the root project.
So now the root project dont have any subprojects.
The spring-boot-start
project is now independent and no tasks of it can be run from this composite build setup.
Solution
So, to fix this, we will create a task in root project which delegates to the task of sub module in spring-boot-start
project.
Sample Task in root build.gradle should look like this
task buildLibraryManagementApp {
dependsOn gradle.includedBuild('spring-boot-start').task(':library-management-application:build')
}
Generate the project from https://start.spring.io/
Copy all files except the src folder, to the project location.
Project won't be detected as gradle project. Reimport the same from intellij. Closing the project and reopening it will show up the below popup, click on import gradle project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.