[AOP] p.454 트랜잭션 프록시 팩토리 빈 TxProxyFactoryBean 적용 및 테스트
Closed this issue · 0 comments
SeokRae commented
TxProxyFactoryBean이라는 팩토리 빈에 대한 테스트 코드를 작성하려고하면
하기 오류가 나는데 왜 때문일까요?...
No bean named '$userService' available
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '$userService' available
at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:863)
at app//org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344)
at app//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
at app//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at app//org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160)
at app//com.example.aop.factory.TxProxyFactoryBeanTest.upgradeAllOrNothing(TxProxyFactoryBeanTest.java:58)
at java.base@16.0.2/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base@16.0.2/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base@16.0.2/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base@16.0.2/java.lang.reflect.Method.invoke(Method.java:567)
at app//org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)