本帖最后由 xiaogu 于 2018-12-23 17:30 编辑 e8 l: D. R& }" a
# K5 Q& I6 s7 C; SException sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]0 \( V, d- q! Z! N
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.gz.struts.action.PlayAction] for bean with name '/playAction' defined in class path resource [applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.gz.struts.action.PlayAction+ a, L/ \; s w& i( P( B6 r
求帮助这是代码https://pan.baidu.com/s/1KovJpL1Y236-J8Wf4RfbVA配置文件 # D* b- ]% T- O: M5 v<?xml version="1.0" encoding="UTF-8"?>* z9 e; c: F5 R# b7 b7 R! o
<beans xmlns="http://www.springframework.org/schema/beans"1 k5 o! L m! `7 l) \, I* A2 V3 m
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"5 E0 d4 X; h9 s G! o6 I
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">0 r; R# a* U5 N" M4 V
" S5 J$ @. ]5 z/ x# R2 ^( o <bean name="/playAction" class="org.gz.struts.action.PlayAction"> : l) g; c: ^, p4 f0 m% e <property name="playService" ref="playService" /> 4 j8 a' J1 S# L6 a5 m7 I. m </bean># z! m9 J C6 u# o0 j
<bean id="playService" / C& I$ B( z* u& k7 D class="org.gz.service.impl.PlayServiceImpl">! H! t$ X$ `& k& b# s E6 v9 T1 V
<property name="playDao" ref="playDao" />0 g7 {; g2 Q# ~
</bean> 5 x# |( F0 F1 E <bean id="playDao" class="org.gz.dao.impl.PlayDaoImpl" /> 3 f: G5 _$ J( b 5 J6 J c' `& t9 z/ N8 q F <bean name="/userAction" class="org.gz.struts.action.UserAction"> $ b! l+ }! m+ n <property name="userService" ref="userService" /> 0 N; K5 D6 z2 F <property name="allTypeService" ref="allTypeService"/>) ]- E) h9 j7 a! @! m
</bean> . Q5 o* M$ t* [4 \. v* p <bean id="userService" # X: W$ m& a* M3 A: L. v( m class="org.gz.service.impl.UserServiceImpl"> 9 y) L9 n0 K; V. n! S <property name="userDao" ref="userDao" />. L# Q* p7 U0 J' a: @) C- W; b/ V
</bean>% M j- V5 G; E4 S2 ] L. e. |% u
<bean id="userDao" class="org.gz.dao.impl.UserDaoImpl" />+ [/ U! ^/ h2 Y8 z9 p, E: m
% D# A* l1 U1 F7 V" o <bean name="/typeAction" class="org.gz.struts.action.TypeAction">; Y* ~8 _3 W7 J) [0 |/ g
<property name="allTypeService" ref="allTypeService"/># r( I4 N% K( e$ \5 J
</bean> " b% B6 u) O8 D* [3 W) X" G0 y <bean id="allTypeService" class="org.gz.service.impl.AllTypeServiceImpl">$ a# q) v; x" ?* S& L* x
<property name="allTypeDao" ref="allTypeDao"/>) Q( U2 g$ S% l1 k4 \" c
</bean> . O, n1 ^6 K2 `9 Q" z- L2 v <bean id="allTypeDao" class="org.gz.dao.impl.AllTypeDaoImpl"/>, E3 A% A2 t3 C7 f B
, Q+ \: ^8 A: s* _4 k* z
<bean name="/typeItemAction" class="org.gz.struts.action.TypeItemAction">! Q" D' ^- I$ H' }- ?+ L( ?" w0 _3 e
<property name="allTypeService" ref="allTypeService"/>! j/ H. B7 P6 b
</bean> 0 h7 Z) F8 T7 o* W, W' i% h) `$ O <bean name="/fileAction" class="org.gz.struts.action.FileAction"> 9 i. Q9 B0 u/ N, h* Q4 C; y <property name="fileService" ref="fileService"/> ) [" H4 [2 i) _) ~# O </bean>) P! Q8 Y8 L% w2 W) x/ ~/ y5 I
<bean id="fileService" class="org.gz.service.impl.FileServiceImpl">) k( m( E8 {" p, f& M: L: |/ \
<property name="fileDao" ref="fileDao"/>2 l& y1 C- b" ~; U% n6 y
</bean> 7 \& ]! i6 N, _. y" U <bean id="fileDao" class="org.gz.dao.impl.FileDaoImpl"/> ) l$ Y: g; n, z( w5 V9 z % o% H6 t0 v% ?9 y4 } <bean name="/newsAction" class="org.gz.struts.action.NewsAction">8 Y+ w9 R9 |* C; O5 H, f
<property name="newsService" ref="newsService"/> 1 N( D4 `+ g; v, A2 g8 j <property name="playService" ref="playService"/> ) P5 k9 S% {" n. h4 A2 X& [/ Y g </bean> * Z5 a: H5 [( }/ y; { <bean id="newsService" class="org.gz.service.impl.NewsServiceImpl">$ _5 A9 P7 ?: t* r6 Z
<property name="newsDao" ref="newsDao"/>0 N) s* d, R. N
</bean> 7 R9 W A7 ~. [9 @! o4 R <bean id="newsDao" class="org.gz.dao.impl.NewsDaoImpl"/>4 f2 A9 B7 w* t
6 T- G! w. W4 w <bean name="/registAction" class="org.gz.struts.action.RegistAction"> 8 P. ^" P. H& U% ^9 j# Y7 { <property name="registService" ref="registService"/>$ }! D# |; D3 F5 V% N7 H( B! Q" k
<property name="playService" ref="playService"/>2 Z7 b+ a% Q1 \0 n" H
</bean> K1 Y* X; F/ h <bean id="registService" class="org.gz.service.impl.RegistServiceImpl">. m6 K- r- z6 K' V+ N
<property name="registDao" ref="registDao"/>& z2 P+ r! Y# I$ L, F
</bean>& V% j0 T" W$ Y3 e- ?
<bean id="registDao" class="org.gz.dao.impl.RegistDaoImpl"/> 9 g s- E3 y. j O* Z. u! l' M3 g$ g</beans> * Q+ |( z" c# ?- ^8 b+ n4 M5 x2 [9 r1 t( F
. d% e! w5 u, Q0 `! o2 U* o