SSH2整合过程出错了。
严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframewor...
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'dao' of bean class [com.eportal.service.MessageServiceImpl]: No property 'dao' found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
······························
Caused by: org.springframework.beans.InvalidPropertyException: Invalid property 'dao' of bean class [com.eportal.service.MessageServiceImpl]: No property 'dao' found
配置文件如下
<property name="mappingResources">
<list>
<value>com/eportal/ORM/News.hbm.xml</value>
<value>com/eportal/ORM/Category.hbm.xml</value>
<value>com/eportal/ORM/Memberlevel.hbm.xml</value>
<value>com/eportal/ORM/Cart.hbm.xml</value>
<value>com/eportal/ORM/Traffic.hbm.xml</value>
<value>com/eportal/ORM/Newsrule.hbm.xml</value>
<value>com/eportal/ORM/Merchandise.hbm.xml</value>
<value>com/eportal/ORM/Admin.hbm.xml</value>
<value>com/eportal/ORM/Orders.hbm.xml</value>
<value>com/eportal/ORM/Cartselectedmer.hbm.xml</value>
<value>com/eportal/ORM/Newscolumns.hbm.xml</value>
<value>com/eportal/ORM/Member.hbm.xml</value>
<value>com/eportal/ORM/Message.hbm.xml</value>
</list>
</property>
<!-- 针对指定的bean自动生成业务代理 -->
<property name="beanNames">
<list>
<value>adminService</value>
<value>columnsService</value>
<value>newsService</value>
<value>crawlService</value>
<value>memberLevelService</value>
<value>memberService</value>
<value>categoryService</value>
<value>merService</value>
<value>cartService</value>
<value>ordersService</value>
<value>trafficService</value>
<value>messageService</value>
</list>
</property>
<!-- 装配通用数据库访问类BaseDAOImpl -->
<bean id="dao" class="com.eportal.DAO.BaseDAOImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 部署会员管理业务逻辑组件MemberServiceImpl -->
<bean id="memberService" class="com.eportal.service.MemberServiceImpl">
<property name="dao" ref="dao"/>
</bean> 展开
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'dao' of bean class [com.eportal.service.MessageServiceImpl]: No property 'dao' found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
······························
Caused by: org.springframework.beans.InvalidPropertyException: Invalid property 'dao' of bean class [com.eportal.service.MessageServiceImpl]: No property 'dao' found
配置文件如下
<property name="mappingResources">
<list>
<value>com/eportal/ORM/News.hbm.xml</value>
<value>com/eportal/ORM/Category.hbm.xml</value>
<value>com/eportal/ORM/Memberlevel.hbm.xml</value>
<value>com/eportal/ORM/Cart.hbm.xml</value>
<value>com/eportal/ORM/Traffic.hbm.xml</value>
<value>com/eportal/ORM/Newsrule.hbm.xml</value>
<value>com/eportal/ORM/Merchandise.hbm.xml</value>
<value>com/eportal/ORM/Admin.hbm.xml</value>
<value>com/eportal/ORM/Orders.hbm.xml</value>
<value>com/eportal/ORM/Cartselectedmer.hbm.xml</value>
<value>com/eportal/ORM/Newscolumns.hbm.xml</value>
<value>com/eportal/ORM/Member.hbm.xml</value>
<value>com/eportal/ORM/Message.hbm.xml</value>
</list>
</property>
<!-- 针对指定的bean自动生成业务代理 -->
<property name="beanNames">
<list>
<value>adminService</value>
<value>columnsService</value>
<value>newsService</value>
<value>crawlService</value>
<value>memberLevelService</value>
<value>memberService</value>
<value>categoryService</value>
<value>merService</value>
<value>cartService</value>
<value>ordersService</value>
<value>trafficService</value>
<value>messageService</value>
</list>
</property>
<!-- 装配通用数据库访问类BaseDAOImpl -->
<bean id="dao" class="com.eportal.DAO.BaseDAOImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 部署会员管理业务逻辑组件MemberServiceImpl -->
<bean id="memberService" class="com.eportal.service.MemberServiceImpl">
<property name="dao" ref="dao"/>
</bean> 展开
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询