2
응용 프로그램 컨텍스트 XML 파일에서 생성자 인수를 정적 클래스 멤버로 설정하는 방법은 무엇입니까?Spring Application Context : 클래스의 생성자 인수를 클래스 정적 멤버 변수로 설정하는 방법은 무엇입니까?
예를 들어 Restlet을 사용하고 있으며 ChallengeAuthenticator라는 Restlet 클래스 중 하나가 요청 구성표 멤버 변수를받습니다.
// Normal Initialization
ChallengeAuthenticator challengeAuthenticator = new ChallengeAuthenticator(
null, ChallengeScheme.HTTP_BASIC, "WSRealm");
가능하면이 내용을 응용 프로그램 컨텍스트에두고 싶습니다. 이 같은 사람 :
<bean id="challengeAuthenticator" class="org.restlet.security.ChallengeAuthenticator">
<!-- Not meant to be String for value just trying to make it easier to reader to interpret my question -->
<constructor-arg value="ChallengeScheme.HTTP_BASIC" />
</bean>
감사합니다. :디 – ColinMc