Skip to content

Instantly share code, notes, and snippets.

@acdcjunior
Created March 22, 2018 20:19
Show Gist options
  • Save acdcjunior/9c4f3411963181c298e20a369d40d03b to your computer and use it in GitHub Desktop.
Save acdcjunior/9c4f3411963181c298e20a369d40d03b to your computer and use it in GitHub Desktop.
Ver propriedade/debugar spring
/*
Adicione no CONFIG: @EnableScheduling
*/
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class VerPropriedade {
@Value("${URL_BASE_PROCESSO}")
private String processo;
@Value("${URL_BASE_DOCUMENTO}")
private String documento;
@Value("${BOB_NELSON}")
private String BOB_NELSON;
@Scheduled(fixedDelay = 1000)
public void scheduleFixedDelayTask() {
System.out.println("URL_BASE_PROCESSO: " + processo);
System.out.println("BOB_NELSON: " + BOB_NELSON);
System.out.println("URL_BASE_DOCUMENTO: " + documento);
System.out.println();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment