­

My Quotes


When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY





Free users please don't remove our link. Get the code again.

Saturday, March 8, 2014

Host Identifier and Spring

Spring and Host Identifiers

 
   
 
            
            
             Dev
            
    

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class HostIdentifier {
    @Autowired
    private String hostname;

    @Autowired
    private String region;

    public String getHostname() {
 return hostname;
    }

    public void setHostname(String hostname) {
 this.hostname = hostname;
    }

    public String getRegion() {
 return region;
    }

    public void setRegion(String region) {
 this.region = region;
    }

}

No comments :