千家信息网

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

发表于:2024-09-26 作者:千家信息网编辑
千家信息网最后更新 2024年09月26日,如何解决ssh项目中 call 'refresh' before multicasting events异常,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的
千家信息网最后更新 2024年09月26日如何解决ssh项目中 call ‘refresh‘ before multicasting events异常

如何解决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.截图如下


3.原因分析

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

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

4.后来改了这样写:

jdbc:mysql://localhost:3306/db_hoteluseUnicode=true&characterEncoding=utf-8

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


5.成功运行了项目


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

0