spring boot - Unable to access H2 console in gradle multiproject build, when H2 settings are in subproject -
i new springboot , gradle , facing below issue in gradle multi-project build.
problem: when move h2 dependency , below h2 properties 'rootproject' able access h2 console. when move these dependency , properties webapp subproject no longer able access h2 console. can please me?
**h2 properties** spring.h2.console.enabled=true spring.h2.console.path=/console i have 1 root project 'rootproject' , 2 sub projects 'common' , 'webapp'.
in 'rootproject' have settings.gradle , build.gradle below content:
**settings.gradle** include 'common' include 'webapp' **build.gradle** apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' buildscript{ allprojects{ ext{ springbootversion = '1.5.1.release' } } repositories{ mavencentral() } dependencies{ classpath "org.springframework.boot:spring-boot-gradle- plugin:${springbootversion}" } } sourcecompatibility = 1.8 group ='com.kush' version = '1.0.snapshot' archivesbasename = "myfirstspringbootproject" jar { manifest { attributes 'implementation-title': 'gradle quickstart', 'implementation-version': version } } repositories { mavencentral() } dependencies { project(':common') project(':webapp') compile group: "org.springframework.boot", name:"spring-boot-starter", version: "${springbootversion}" compile group: "org.springframework.boot", name:"spring-boot-starter-web", version: "${springbootversion}" compile group: "org.springframework.boot", name:"spring-boot-starter-data- jpa", version: "${springbootversion}" compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1' compile group: 'commons-collections', name: 'commons-collections', version: '3.2' testcompile group: 'junit', name: 'junit', version: '4.+' runtime('com.h2database:h2') } task wrapper(type: wrapper){ gradleversion ='3.0' } }
Comments
Post a Comment