bladex-Links 集成组态

Blade 未结 1 580
迈克瑞
迈克瑞 剑侠 2025-02-27 14:11

一、该问题的重现步骤是什么?

1. bladex-Links集成组态,运行动态数据源报错。

2. image.png

3.配置数据源是给组态提供数据吗


二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?


四、请提供详细的错误堆栈信息,这很重要。

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.

2025-02-27 11:16:00.721 ERROR 15920 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


Parameter 0 of constructor in com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAopConfiguration required a single bean, but 2 were found:

- spring.datasource.dynamic-com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties: defined in unknown location

- dynamicDataSourceProperties: defined by method 'dynamicDataSourceProperties' in class path resource [com/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceAopConfiguration.class]


This may be due to missing parameter name information


Action:


Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed


Ensure that your compiler is configured to use the '-parameters' flag.

You may need to update both your build tool settings as well as your IDE.

(See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention)

五、若有更多详细信息,请在下面提供。

1条回答
  • 2025-02-27 14:17

    你是把组态后端集成到了物联网后端吗,如果集成的话,关于多数据源的配置代码、pom依赖都要加上。

    但是不建议你集成,两个应该分开,因为他们是独立的。

    作者追问:2025-02-27 14:20

    多数据源哪里怎么集成。


    作者追问:2025-02-27 14:27

    我就是这样操作的。报我提交的错误。

    Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.

    2025-02-27 11:16:00.721 ERROR 15920 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


    ***************************

    APPLICATION FAILED TO START

    ***************************


    Description:


    Parameter 0 of constructor in com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAopConfiguration required a single bean, but 2 were found:

    - spring.datasource.dynamic-com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties: defined in unknown location

    - dynamicDataSourceProperties: defined by method 'dynamicDataSourceProperties' in class path resource [com/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceAopConfiguration.class]


    This may be due to missing parameter name information


    Action:


    Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed


    Ensure that your compiler is configured to use the '-parameters' flag.

    You may need to update both your build tool settings as well as your IDE.

    (See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention)


    回答: 2025-02-27 14:30

    你单组态跑起来会不会报错

    作者追问:2025-02-27 14:36

    不报错


    回答: 2025-02-27 15:10

    那就得再检查这个提交有没有什么遗漏了,另外组态和物联网后端目前是没有做过集成适配的,所以也有这种可能性。我们还是推荐作为独立服务集成,不要把源码集成到blade-server里。比如你在blade-server服务同目录,创建新的blade-scada这样的服务,独立运行

    0 讨论(0)
代码语言
提交回复