Mulit module with each module provide rest service in gradle with springWhat's the difference between @Component, @Repository & @Service annotations in Spring?Dealing with “Xerces hell” in Java/Maven?IntelliJ Spring Gradle Project Annotations Not WorkingHow to execute test Method by gradle test task?Plugin itself can't add buildscript dependencies and then apply dokka-android pluginIntellij cannot find Maven Dependencies in pom.xmlERROR: Your buildpacks do not contain the heroku/jvm buildpack!Add heroku/jvm to your buildpackError after adding spring-data-jpa into gradle file?Using Gradle 5.1 “implementation platform” instead of Spring Dependency Management PluginCan`t build gradle project with org.springframework.boot 1.5.19.RELEASE
What's the phrasal verb for carbonated drinks exploding out of the can after being shaken?
Teferi's Time Twist on creature with +1/+1 counter
Why is "dark" an adverb in this sentence?
Why don't commercial aircraft adopt a slightly more seaplane-like design to allow safer ditching in case of emergency?
Is dividends exclusively a part of earnings?
Why does the Trade Federation become so alarmed upon learning the ambassadors are Jedi Knights?
What are "full piece" and "half piece" in chess?
Using two linked programs, output ordinal numbers up to n
What is the technical explanation of the note "A♭" in a F7 chord in the key of C?
Why do the faithful have to say "And with your spirit " in Catholic Mass?
Why do candidates not quit if they no longer have a realistic chance to win in the 2020 US presidents election
Draw a line nicely around notes
I won USD 50K! Now what should I do with it?
I do not have power to all my breakers
What are the arguments for California’s nonpartisan blanket primaries?
Does knowing a graph has a Hamiltonian Cycle make it easier to find the cycle?
Why does the Earth have a z-component at the start of the J2000 epoch?
Too many spies!
What made Windows ME so crash-prone?
Will it hurt my career to work as a graphic designer in a startup for beauty and skin care?
Did 007 exist before James Bond?
Why use null function instead of == [] to check for empty list in Haskell?
Why did Spider-Man take a detour to Dorset?
Can't update Ubuntu 18.04.2
Mulit module with each module provide rest service in gradle with spring
What's the difference between @Component, @Repository & @Service annotations in Spring?Dealing with “Xerces hell” in Java/Maven?IntelliJ Spring Gradle Project Annotations Not WorkingHow to execute test Method by gradle test task?Plugin itself can't add buildscript dependencies and then apply dokka-android pluginIntellij cannot find Maven Dependencies in pom.xmlERROR: Your buildpacks do not contain the heroku/jvm buildpack!Add heroku/jvm to your buildpackError after adding spring-data-jpa into gradle file?Using Gradle 5.1 “implementation platform” instead of Spring Dependency Management PluginCan`t build gradle project with org.springframework.boot 1.5.19.RELEASE
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am try to create multi module spring project with Gradle.
Each module has independent rest api service.
I haven't idea too much with Gradle.
library-application can access by application module but not able to execute simultaneously API of each modules using tomcat.
Module 1st : application
File settings.gradle:
rootProject.name = 'application'
include ':library-application'
project(':library-application').projectDir = new File('../library-application')
File build.gradle:
buildscript
ext springBootVersion = '2.1.3.RELEASE'
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
bootJar
baseName = 'gs-multi-application'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
compile project(':library-application')
testCompile('org.springframework.boot:spring-boot-starter-test')
Module 2nd : library-application
File build.gradle:
buildscript
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
plugins id "io.spring.dependency-management" version "1.0.5.RELEASE"
ext springBootVersion = '2.1.3.RELEASE'
jar
baseName = 'gs-multi-library'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
java spring gradle
add a comment |
I am try to create multi module spring project with Gradle.
Each module has independent rest api service.
I haven't idea too much with Gradle.
library-application can access by application module but not able to execute simultaneously API of each modules using tomcat.
Module 1st : application
File settings.gradle:
rootProject.name = 'application'
include ':library-application'
project(':library-application').projectDir = new File('../library-application')
File build.gradle:
buildscript
ext springBootVersion = '2.1.3.RELEASE'
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
bootJar
baseName = 'gs-multi-application'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
compile project(':library-application')
testCompile('org.springframework.boot:spring-boot-starter-test')
Module 2nd : library-application
File build.gradle:
buildscript
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
plugins id "io.spring.dependency-management" version "1.0.5.RELEASE"
ext springBootVersion = '2.1.3.RELEASE'
jar
baseName = 'gs-multi-library'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
java spring gradle
What do you mean: "not able to execute simultaneously API"? How do you start your Spring Boot application, embedded or container?
– Hank
Mar 26 at 8:06
I want run root project "application", its child "library-application" should run own webservice.
– Vinod
Mar 26 at 8:52
It's not the way how Gralde child project works. You should consider the root project as kind of "shared library" and it shouldn't be "run" in general.
– Hank
Mar 26 at 10:06
That means, Is it not possible server start from root project and individual project give service separate webservices?
– Vinod
Mar 26 at 10:21
add a comment |
I am try to create multi module spring project with Gradle.
Each module has independent rest api service.
I haven't idea too much with Gradle.
library-application can access by application module but not able to execute simultaneously API of each modules using tomcat.
Module 1st : application
File settings.gradle:
rootProject.name = 'application'
include ':library-application'
project(':library-application').projectDir = new File('../library-application')
File build.gradle:
buildscript
ext springBootVersion = '2.1.3.RELEASE'
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
bootJar
baseName = 'gs-multi-application'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
compile project(':library-application')
testCompile('org.springframework.boot:spring-boot-starter-test')
Module 2nd : library-application
File build.gradle:
buildscript
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
plugins id "io.spring.dependency-management" version "1.0.5.RELEASE"
ext springBootVersion = '2.1.3.RELEASE'
jar
baseName = 'gs-multi-library'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
java spring gradle
I am try to create multi module spring project with Gradle.
Each module has independent rest api service.
I haven't idea too much with Gradle.
library-application can access by application module but not able to execute simultaneously API of each modules using tomcat.
Module 1st : application
File settings.gradle:
rootProject.name = 'application'
include ':library-application'
project(':library-application').projectDir = new File('../library-application')
File build.gradle:
buildscript
ext springBootVersion = '2.1.3.RELEASE'
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
bootJar
baseName = 'gs-multi-application'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
compile project(':library-application')
testCompile('org.springframework.boot:spring-boot-starter-test')
Module 2nd : library-application
File build.gradle:
buildscript
repositories jcenter()
mavenCentral()
maven url "https://plugins.gradle.org/m2/"
dependencies classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0',
classpath 'org.apache.openjpa:openjpa-all:2.4.1'
classpath 'at.schmutterer.oss.gradle:gradle-openjpa:0.2.0'
plugins
id "io.spring.dependency-management" version "1.0.5.RELEASE"
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'tomcat'
plugins id "io.spring.dependency-management" version "1.0.5.RELEASE"
ext springBootVersion = '2.1.3.RELEASE'
jar
baseName = 'gs-multi-library'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories mavenCentral()
dependencies
compile('org.springframework.boot:spring-boot-starter')
testCompile('org.springframework.boot:spring-boot-starter-test')
java spring gradle
java spring gradle
asked Mar 26 at 7:36
VinodVinod
2602 silver badges15 bronze badges
2602 silver badges15 bronze badges
What do you mean: "not able to execute simultaneously API"? How do you start your Spring Boot application, embedded or container?
– Hank
Mar 26 at 8:06
I want run root project "application", its child "library-application" should run own webservice.
– Vinod
Mar 26 at 8:52
It's not the way how Gralde child project works. You should consider the root project as kind of "shared library" and it shouldn't be "run" in general.
– Hank
Mar 26 at 10:06
That means, Is it not possible server start from root project and individual project give service separate webservices?
– Vinod
Mar 26 at 10:21
add a comment |
What do you mean: "not able to execute simultaneously API"? How do you start your Spring Boot application, embedded or container?
– Hank
Mar 26 at 8:06
I want run root project "application", its child "library-application" should run own webservice.
– Vinod
Mar 26 at 8:52
It's not the way how Gralde child project works. You should consider the root project as kind of "shared library" and it shouldn't be "run" in general.
– Hank
Mar 26 at 10:06
That means, Is it not possible server start from root project and individual project give service separate webservices?
– Vinod
Mar 26 at 10:21
What do you mean: "not able to execute simultaneously API"? How do you start your Spring Boot application, embedded or container?
– Hank
Mar 26 at 8:06
What do you mean: "not able to execute simultaneously API"? How do you start your Spring Boot application, embedded or container?
– Hank
Mar 26 at 8:06
I want run root project "application", its child "library-application" should run own webservice.
– Vinod
Mar 26 at 8:52
I want run root project "application", its child "library-application" should run own webservice.
– Vinod
Mar 26 at 8:52
It's not the way how Gralde child project works. You should consider the root project as kind of "shared library" and it shouldn't be "run" in general.
– Hank
Mar 26 at 10:06
It's not the way how Gralde child project works. You should consider the root project as kind of "shared library" and it shouldn't be "run" in general.
– Hank
Mar 26 at 10:06
That means, Is it not possible server start from root project and individual project give service separate webservices?
– Vinod
Mar 26 at 10:21
That means, Is it not possible server start from root project and individual project give service separate webservices?
– Vinod
Mar 26 at 10:21
add a comment |
1 Answer
1
active
oldest
votes
In general, root project in Gradle does nothing but only hold a overall build.gradle
and settings.properties
to group child projects together. Module planning should be done via managing dependencies of child projects, not the folder structure.
Try to organize your projects in this way:
root_project (very simple project doing nothing)
- library-application
- Provide service controllers
- application (depends on library-application)
- Provide SpringBootApplication
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351910%2fmulit-module-with-each-module-provide-rest-service-in-gradle-with-spring%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In general, root project in Gradle does nothing but only hold a overall build.gradle
and settings.properties
to group child projects together. Module planning should be done via managing dependencies of child projects, not the folder structure.
Try to organize your projects in this way:
root_project (very simple project doing nothing)
- library-application
- Provide service controllers
- application (depends on library-application)
- Provide SpringBootApplication
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
add a comment |
In general, root project in Gradle does nothing but only hold a overall build.gradle
and settings.properties
to group child projects together. Module planning should be done via managing dependencies of child projects, not the folder structure.
Try to organize your projects in this way:
root_project (very simple project doing nothing)
- library-application
- Provide service controllers
- application (depends on library-application)
- Provide SpringBootApplication
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
add a comment |
In general, root project in Gradle does nothing but only hold a overall build.gradle
and settings.properties
to group child projects together. Module planning should be done via managing dependencies of child projects, not the folder structure.
Try to organize your projects in this way:
root_project (very simple project doing nothing)
- library-application
- Provide service controllers
- application (depends on library-application)
- Provide SpringBootApplication
In general, root project in Gradle does nothing but only hold a overall build.gradle
and settings.properties
to group child projects together. Module planning should be done via managing dependencies of child projects, not the folder structure.
Try to organize your projects in this way:
root_project (very simple project doing nothing)
- library-application
- Provide service controllers
- application (depends on library-application)
- Provide SpringBootApplication
answered Mar 27 at 6:59
HankHank
9035 silver badges25 bronze badges
9035 silver badges25 bronze badges
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
add a comment |
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
Thanks for hint. I will check and update you.
– Vinod
Mar 27 at 7:38
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351910%2fmulit-module-with-each-module-provide-rest-service-in-gradle-with-spring%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you mean: "not able to execute simultaneously API"? How do you start your Spring Boot application, embedded or container?
– Hank
Mar 26 at 8:06
I want run root project "application", its child "library-application" should run own webservice.
– Vinod
Mar 26 at 8:52
It's not the way how Gralde child project works. You should consider the root project as kind of "shared library" and it shouldn't be "run" in general.
– Hank
Mar 26 at 10:06
That means, Is it not possible server start from root project and individual project give service separate webservices?
– Vinod
Mar 26 at 10:21