SHARE
TWEET

Untitled

a guest Jan 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server.ip=000.000.000.000
  2. server.port=0000
  3.    
  4. @Component
  5. @ConfigurationProperties(prefix = "server")
  6. public class AppProperties {
  7.  
  8.     private String url;
  9.     private Integer port;
  10.  
  11. ... getters ans setters
  12.    
  13. @Component
  14. public class Teste {
  15.  
  16.     @Autowired
  17.     private AppProperties properties;
  18.  
  19. ...
  20.  
  21.     socket = new Socket(properties.getIp(), properties.getPort());
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top