如何解决ssh项目中 call ‘refresh‘ before multicasting events异常

发布时间:2021-12-06 09:31:25 作者:柒染
来源:亿速云 阅读:807

如何解决ssh项目中 call ‘refresh‘ before multicasting events异常,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

1.引言

今天我在运行ssh项目时报了如下错误,导致我访问项目页面出现404

1.ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Sat Jul 18 22:34:04 CST 2020]; root of context hierarchy.。。。

2.LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Sat Jul 18 22:34:04 CST 2020]; root of context hierarchy

2.截图如下

如何解决ssh项目中 call ‘refresh‘ before multicasting events异常

3.原因分析

这种情况的首要原因与数据库的连接有问题,也就是我们在spring配置bean里的dataSource的url连接有问题了。我是这样写的:

  <property name="url">

   <value>jdbc:mysql://localhost:3306/db_hotel?useUnicode=true&characterEncoding=utf-8</value>

</property>

4.后来改了这样写:

<property name="url">  <value>jdbc:mysql://localhost:3306/db_hoteluseUnicode=true&amp;characterEncoding=utf-8</value>

  </property>

对的,加了&amp ;就不会报错了,成功运行起了项目!如下所示:

如何解决ssh项目中 call ‘refresh‘ before multicasting events异常

5.成功运行了项目

如何解决ssh项目中 call ‘refresh‘ before multicasting events异常

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注亿速云行业资讯频道,感谢您对亿速云的支持。

推荐阅读:
  1. 使用haproxy 实现 http/ssh/mstsc复用
  2. Request模块怎么在python项目中使用

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ssh

上一篇:Hibernate的Criteria Query是什么

下一篇:Hibernate实体对象的生命周期是什么

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》