Skip to content

Instantly share code, notes, and snippets.

@mehmetcemyucel
Created February 4, 2019 19:40
Show Gist options
  • Save mehmetcemyucel/17f7bf51bad125775bfbd88082a2d983 to your computer and use it in GitHub Desktop.
Save mehmetcemyucel/17f7bf51bad125775bfbd88082a2d983 to your computer and use it in GitHub Desktop.
mcy-sb-external-config
package com.mcy;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@Component
public class SimpleService {
@Value("${message}")
private String value;
@PostConstruct
public void method() {
log.info(value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment