オブジェクトを挿入しようとすると、nullポインタ例外が発生します。これが私のコードです:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
</param-value>
</context-param>'
ApplicationContext.XML
<bean id="accessDao"
Class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
autowire-candidate="true">
<property name="transactionManager" ref="txManager" />
<property name="target" ref="accessDaoTarget" />
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean> '
CommonBean
import com.domain.dao.IDao;
@Named
public class CommonBean implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@Inject
private IDao accessDao;
public IDao getAccessDao()
{
return accessDao;
}
public void setAccessDao(IDao accessDao)
{
this.accessDao = accessDao;
}
}