Created
November 18, 2018 18:25
-
-
Save rkokhatskyi/10af1720c7d0ab1f37e33e064e93fa37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cc.gallery.models; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import javax.annotation.Resource; | |
@Configuration | |
public class UserConfig { | |
@Resource(name = "companionData") | |
public LoginDTO companionLoginObject; | |
@Resource(name = "clientData") | |
public LoginDTO clientLoginObject; | |
@Value("testData/${env}/сlientDTO.json") | |
private String clientDTO; | |
@Value("testData/${env}/сompanionDTO.json") | |
private String companionDTO; | |
@Bean(name = "companionData") | |
public LoginDTO companionData() { | |
return LoginDTO.parseJson(companionDTO); | |
} | |
@Bean(name = "clientData") | |
public LoginDTO clientData() { | |
return LoginDTO.parseJson(clientDTO); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment