Friday, October 23, 2015

SPRING - stereotypes example

import org.springframework.beans.factory.annotation.Autowired;import org.springframework.beans.factory.annotation.Value;import org.springframework.stereotype.Service;
import java.util.*;
@Service("myConfigServiceFacade")public class MyConfigServiceFacadeImpl implements MyConfigServiceFacade {

    @Value("${com.foo.isWebSSOEnabled}")
    private String webSSOEnabled;
    @Value("${com.foo.webSSOlogoutURL}")
    private String webSSOInternetLogoutURL;
    @Value("${com.foo.webSSOlogoutURL}")
    private String webSSOIntranetLogoutURL;
    @Value("${com.foo.brandbarURL}" )
    private String brandbarURL;
    @Value("${com.foo.4eye.active}")
    private boolean is4eyeActive;
    @Autowired
    private MyPrincipalService principalService;

====================================================

import com.google.gwt.user.client.rpc.RemoteService;import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;import java.util.Map;import java.util.Set;
@RemoteServiceRelativePath("services/myConfigServiceFacade.rpc")
public interface MyConfigServiceFacade extends RemoteService {
    ApplicationInfo getApplicationInfo();
    SessionInfo config() throws Exception;
    Map<Long, Set<String>> configAllowedAccounts(Long var1, Long var2) throws Exception;}