急求!!!SSM项目启动报错

kevin.wu¹²³⁴ 2017-11-13 12:30:32












不要讲什么没有使用@Controller或者@Service注解
麻烦大神认真看下
感谢不尽
...全文
534 21 打赏 收藏 转发到动态 举报
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
kevin.wu¹²³⁴ 2017-11-14
  • 打赏
  • 举报
回复
引用 16 楼 azui999的回复:
项目发给我,来看看。等你回复
怎么发给你 qq上吗
kevin.wu¹²³⁴ 2017-11-14
  • 打赏
  • 举报
回复
引用 17 楼 qq_22865645的回复:
解决了吗??应该是你的@Service没有扫描进去吧,试试看改一下<context:component-scan base-package="”/>,下面有个示例:
<context:component-scan base-package="
com.bioeh.hm.bsp.biz.*,
com.bioeh.sp.hm.bsp.biz.*.business,
com.bioeh.sp.hm.bsp.biz.*.service,
com.bioeh.sp.hm.doctor.biz.*.business,
com.bioeh.sp.hm.doctor.biz.*.service,
com.bioeh.mongo.tool.service.*,
com.bioeh.hm.servive.record.biz.service.*,
com.bioeh.hm.servive.record.service.*,
com.bioeh.sp.hm.*.biz.service,
com.bioeh.sp.hm.*.biz.business,
com.bioeh.sp.hm.im.*.impl
" />
扫描了啊 在application-service中 包名也没写错
kevin.wu¹²³⁴ 2017-11-14
  • 打赏
  • 举报
回复
引用 18 楼 110成成的回复:
你的接口定义成了private?
不就是private吗 没毛病吧应该
110成成 2017-11-14
  • 打赏
  • 举报
回复
你的接口定义成了private?
轻描_看花开 2017-11-14
  • 打赏
  • 举报
回复
解决了吗??应该是你的@Service没有扫描进去吧,试试看改一下<context:component-scan base-package="”/>,下面有个示例:
<context:component-scan base-package="
com.bioeh.hm.bsp.biz.*,
com.bioeh.sp.hm.bsp.biz.*.business,
com.bioeh.sp.hm.bsp.biz.*.service,
com.bioeh.sp.hm.doctor.biz.*.business,
com.bioeh.sp.hm.doctor.biz.*.service,
com.bioeh.mongo.tool.service.*,
com.bioeh.hm.servive.record.biz.service.*,
com.bioeh.hm.servive.record.service.*,
com.bioeh.sp.hm.*.biz.service,
com.bioeh.sp.hm.*.biz.business,
com.bioeh.sp.hm.im.*.impl
" />
  • 打赏
  • 举报
回复
检查下是不是有两个相同的PaySserviceImpl的类啊,把完整的controller和service类贴出来看看
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
引用 7 楼 weixin_40788619的回复:
淡定aaaaaaaaaaaaa
jdk代理 第一次出现问题
weixin_40788619 2017-11-13
  • 打赏
  • 举报
回复
淡定aaaaaaaaaaaaa
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
引用 3 楼 清晨v的回复:
如果包名也没错,检查web.xml,是不是配置文件都加载了,
方便的话可以帮我远程一下 看下吗
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
引用 2 楼 清晨v的回复:
既然都加了注解,配置文件也没错,就检查下包名是不是写错了
这个肯定没错的…啊啊啊啊
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
引用 1 楼 ostools的回复:
@Service("PayService")
不行,也试过了,而且@resource @autowired 和配置文件的方式都试过了…都不行
清晨v 2017-11-13
  • 打赏
  • 举报
回复
如果包名也没错,检查web.xml,是不是配置文件都加载了,
清晨v 2017-11-13
  • 打赏
  • 举报
回复
既然都加了注解,配置文件也没错,就检查下包名是不是写错了
ostools 2017-11-13
  • 打赏
  • 举报
回复
@Service("PayService")
azui999 2017-11-13
  • 打赏
  • 举报
回复
项目发给我,来看看。等你回复
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
引用 14 楼 清晨v的回复:
把你的web.xml贴出来看看
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>taotao-alipay</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext-*.xml</param-value> </context-param> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>SpringMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <!-- contextConfigLocation不是必须的, 如果不配置contextConfigLocation, springmvc的配置文件默认在:WEB-INF/servlet的name+"-servlet.xml" --> <param-name>contextConfigLocation</param-name> <param-value>classpath:springMVC.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>SpringMVC</servlet-name> <url-pattern>/pay/*</url-pattern> </servlet-mapping> <!-- springMVC的url只能是/或者是*.do或者是*.action --> <!-- /:会拦截所有请求包括静态资源。需要在springmvc.xml中添加静态资源的映射。 --> <!-- 资源映射 --> <!-- <mvc:resources location="/WEB-INF/css/" mapping="/css/**"/> <mvc:resources location="/WEB-INF/js/" mapping="/js/**"/> --> </web-app>
清晨v 2017-11-13
  • 打赏
  • 举报
回复
把你的web.xml贴出来看看
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
大哥们 谁要有空的话帮我远程看下吧 真心感谢了
kevin.wu¹²³⁴ 2017-11-13
  • 打赏
  • 举报
回复
引用 11 楼 木子-轩的回复:
该不会是jar包引入异常了吧
这个真不是 我用maven的
木子0204 2017-11-13
  • 打赏
  • 举报
回复
该不会是jar包引入异常了吧
加载更多回复(1)

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧