eclipse - spring boot use springloaded no work in gradle -


when use springloaded in project. there similar question in spring boot + spring-loaded (intellij, gradle) according document , build.gradle :

buildscript{ ext{     springbootversion = '1.3.5.release' } repositories {     mavencentral() } dependencies {     classpath("org.springframework.boot:spring-boot-gradle-plugin:${springbootversion}")     classpath 'org.springframework:springloaded:1.2.0.release' } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'spring-boot' //apply plugin: 'application' springboot {     backupsource = false     mainclass = 'com.zhb.app.portalapplication' }  jar {     basename = 'springboottest'     version =  '0.0.1-snapshot' }  //applicationdefaultjvmargs = ['-javaagent:e:\\xgsdk\\commonlib\\springloaded-1.2.5.release.jar -noverify']  repositories {     mavencentral() }  dependencies {     compile "org.springframework.boot:spring-boot-starter-web",             "com.alibaba:fastjson:1.2.4",             "commons-codec:commons-codec:1.5",             "org.apache.commons:commons-lang3:3.3.2"      testcompile("org.springframework.boot:spring-boot-starter-test") } 

when run application in eclipse. springloaded not working.
follow springloaded document, add -javaagent:<pathto>/springloaded-{version}.jar -noverify run configuration working well. enter image description here

there 2 question arise in mind.
first springloaded dependency classpath'org.springframework:springloaded:1.2.0.release' not necessary.
second is there way define vm argument -javaagent:<pathto>/springloaded-{version}.jar -noverify in build.gradle.
see gradle document. in build.gradle,the comment code showing
//apply plugin: 'application' //applicationdefaultjvmargs = ['-javaagent:e:\\xgsdk\\commonlib\\springloaded-1.2.5.release.jar -noverify']
not working.

i see use spring 1.3.x

spring loaded in attic: https://spring.io/projects

you should use devtools on: https://spring.io/blog/2015/06/17/devtools-in-spring-boot-1-3

several options available (devtools, spring loaded, jrebel, etc.)

devtools recommended spring way, not way.

from docs: "there several options hot reloading. recommended approach use spring-boot-devtools provides additional development-time features such support fast application restarts , livereload sensible development-time configuration (e.g. template caching).

alternatively, running in ide (especially debugging on) way development (all modern ides allow reloading of static resources , hot-swapping of java class changes).

the spring-boot-devtools module includes support automatic application restarts. whilst not fast technologies such jrebel or spring loaded it’s faster “cold start”. should give try before investigating of more complex reload options discussed below."

spring loaded not active @ moment: https://github.com/spring-projects/spring-loaded/releases hence why it's in attic on spring project page.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -