v3.8.1发布,微服务启动system提示mogodb提示错误

This commit is contained in:
JEECG
2025-06-25 17:51:51 +08:00
parent 553bee57f1
commit 7848881dcb

View File

@ -7,7 +7,9 @@ import org.jeecg.common.util.oConvertUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
@ -21,14 +23,18 @@ import java.net.UnknownHostException;
/** /**
* 微服务启动类(采用此类启动项目为微服务模式) * 微服务启动类(采用此类启动项目为微服务模式)
* 注意: 需要先初始化Nacos的数据库脚本db/tables_nacos.sql * 特别提醒:
* @author zyf * 1、需要先初始化Nacos的数据库脚本db/tables_nacos.sql
* 2.需要集成mogodb请删除 exclude={MongoAutoConfiguration.class}
*
* @author jeecg
* @date: 2022/4/21 10:55 * @date: 2022/4/21 10:55
*/ */
@Slf4j @Slf4j
@SpringBootApplication @SpringBootApplication
@EnableFeignClients(basePackages = {"org.jeecg"}) @EnableFeignClients(basePackages = {"org.jeecg"})
@EnableScheduling @EnableScheduling
@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
public class JeecgSystemCloudApplication extends SpringBootServletInitializer implements CommandLineRunner { public class JeecgSystemCloudApplication extends SpringBootServletInitializer implements CommandLineRunner {
@Autowired @Autowired