File tree Expand file tree Collapse file tree
springboot-starter-script/src/main/java/com/codingapi/springboot/script
springboot-starter/src/main/java/com/codingapi/springboot/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .codingapi .springboot .script ;
22
33import com .codingapi .springboot .script .properties .GroovyScriptProperties ;
4+ import com .codingapi .springboot .script .properties .PropertiesContext ;
45import com .codingapi .springboot .script .runner .GroovyScriptEngineRunner ;
56import org .springframework .boot .context .properties .ConfigurationProperties ;
67import org .springframework .context .annotation .Bean ;
@@ -19,7 +20,9 @@ public GroovyScriptEngineRunner tempClearRunner() {
1920 @ Bean
2021 @ ConfigurationProperties (prefix = "codingapi.script" )
2122 public GroovyScriptProperties groovyScriptProperties (){
22- return new GroovyScriptProperties ();
23+ GroovyScriptProperties properties = new GroovyScriptProperties ();
24+ PropertiesContext .getInstance ().setProperties (properties );
25+ return properties ;
2326 }
2427
2528}
Original file line number Diff line number Diff line change @@ -18,7 +18,4 @@ public class GroovyScriptProperties {
1818 private int shellMaxCacheSize = 10 * 1024 ;
1919
2020
21- public GroovyScriptProperties () {
22- PropertiesContext .getInstance ().setProperties (this );
23- }
2421}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public class PropertiesContext {
1515 private GroovyScriptProperties properties ;
1616
1717 private PropertiesContext (){
18-
18+ properties = new GroovyScriptProperties ();
1919 }
2020
2121 public long getTempValidTime () {
Original file line number Diff line number Diff line change 11package com .codingapi .springboot .framework ;
22
33import com .codingapi .springboot .framework .properties .FrameworkProperties ;
4+ import com .codingapi .springboot .framework .properties .PropertiesContext ;
45import com .codingapi .springboot .framework .utils .VersionUtils ;
56import org .springframework .beans .factory .InitializingBean ;
67import org .springframework .boot .context .properties .ConfigurationProperties ;
@@ -19,7 +20,9 @@ public void afterPropertiesSet() throws Exception {
1920 @ Bean
2021 @ ConfigurationProperties (prefix = "codingapi.framework" )
2122 public FrameworkProperties frameworkProperties () {
22- return new FrameworkProperties ();
23+ FrameworkProperties properties = new FrameworkProperties ();
24+ PropertiesContext .getInstance ().setProperties (properties );
25+ return properties ;
2326 }
2427
2528 public void printBanner (String version ) {
Original file line number Diff line number Diff line change @@ -13,7 +13,4 @@ public class FrameworkProperties {
1313 private int handlerThreadPoolSize = 20 ;
1414
1515
16- public FrameworkProperties () {
17- PropertiesContext .getInstance ().setProperties (this );
18- }
1916}
You can’t perform that action at this time.
0 commit comments