IApplicationContext ctx = Spring.Context.Support.ContextRegistry.GetContext();
T t = (T) ctx.GetObject("BLL");//这条语句报错
“Spring.Core.CannotLoadObjectTypeException”类型的异常在 Spring.Core.dll 中发生,但未在用户代码中进行处理
其他信息: Cannot resolve type [BLLA.Ou_Permission,BLLA] for object with name 'BLL' defined in config [D:\CCode\ReplyCode\MVCOA\MVCOA\web.config#spring/objects] line 1
求解决,求解释????
Spring中配置或者标注没有BLL这个对象的定义吧
<objects xmlns="http://www.springframework.net">
<object id="BLL" type="BLLA.Ou_Permission,BLLA" singleton="false"></object>
</objects>这是在config里面的定义
这是那个类在BLLA的命名空间下
public partial class Ou_Permission : BaseBLL<MODEL.Ou_Permission>, IBLL.IOu_PermissionBLL
{
public override void SetDAL()
{
idal = DBSession.IOu_PermissionDAL;
}
}