Sfoglia il codice sorgente

增加配置文件读取

tags/v1.0.0^2
林万龙 3 anni fa
parent
commit
9a70fc4aee
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. +4
    -1
      src/main/java/com/telpo/dipperposition/config/PositionConfig.java

+ 4
- 1
src/main/java/com/telpo/dipperposition/config/PositionConfig.java Vedi File

@@ -8,8 +8,10 @@ import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

import java.util.Properties;
@@ -30,7 +32,8 @@ public class PositionConfig {
@Value("${hello}")
private String hello;

@Scope("prototype")
@Lazy
@Scope(value = ConfigurableBeanFactory.SCOPE_SINGLETON)
public RzlAccount getRzlAccount() {

RzlAccount rzlAccount = new RzlAccount();


Loading…
Annulla
Salva