mall icon indicating copy to clipboard operation
mall copied to clipboard

esProductRepository和MemberReadHistoryRrepository报错

Open dongZheX opened this issue 2 years ago • 2 comments

你好,我现在正在学习mall项目,遇到了个问题。

我现在idea中新建mall项目,然后分别新建需要的module,pom.xml我都使用了跟github中一样的。

运行mall-admin没有什么问题。 运行mall-portal和mall-search中分别出现下面的错误:

The bean 'memberReadHistoryRepository', defined in com.dongzhex.mall.portal.repository.MemberReadHistoryRepository defined in @EnableMongoRepositories declared on MongoRepositoriesRegistrar.EnableMongoRepositoriesConfiguration, could not be registered. A bean with that name has already been defined in com.dongzhex.mall.portal.repository.MemberReadHistoryRepository defined in @EnableMongoRepositories declared on MongoRepositoriesRegistrar.EnableMongoRepositoriesConfiguration and overriding is disabled.

The bean 'esProductRepository', defined in com.dongzhex.mall.search.repository.EsProductRepository defined in @EnableElasticsearchRepositories declared on ElasticsearchRepositoriesRegistrar.EnableElasticsearchRepositoriesConfiguration, could not be registered. A bean with that name has already been defined in com.dongzhex.mall.search.repository.EsProductRepository defined in @EnableElasticsearchRepositories declared on ElasticsearchRepositoriesRegistrar.EnableElasticsearchRepositoriesConfiguration and overriding is disabled.

检查了下application.yml也没啥问题 提前install了mall-common(没install的时候,在mall-search中包找不到程序包)

但是在github上下载的就可以正常运行

我吧mall-portal, mall-search的main函数文件分别放在了com.macro.mall.portal和com.macro.mall.search同级的地方,然后就可以正常运行了。

找了好久不知道哪儿错了,先继续学springcloud了,求教。

dongZheX avatar Feb 18 '22 11:02 dongZheX

您好,我是彭仕成,已经收到您的邮件!!!

Paolochen avatar Feb 18 '22 11:02 Paolochen

这是来自QQ邮箱的假期自动回复邮件。   你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

Wangyanjunai avatar Feb 18 '22 11:02 Wangyanjunai