dubbo-spring-boot-project icon indicating copy to clipboard operation
dubbo-spring-boot-project copied to clipboard

Config in application.properties but still tried to load dubbo.properties

Open einverne opened this issue 3 years ago • 0 comments

I tried to switch from the traditional Dubbo config dubbo.properties to dubbo-spring-boot-start and config dubbo config in application.properties. But after I delete my dubbo.properties configuration file. I cannot start the application.

2021-01-08 21:00:45,019 WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplication
Context [main] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.
beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [Pla
tformAdminServer]; nested exception is java.io.FileNotFoundException: class path resource [dubbo.properties] cannot b
e opened because it does not exist
2021-01-08 21:00:45,029 ERROR org.springframework.boot.SpringApplication [main] Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [PlatformAdminServer]; nested exception is java.io.FileNotFoundException: class path resource [dubbo.
properties] cannot be opened because it does not exist
        at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(Config
urationClassPostProcessor.java:319)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(C
onfigurationClassPostProcessor.java:236)

I have the dependency.

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>2.7.8</version>
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo</artifactId>
            <version>2.7.8</version>
        </dependency>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
        </dependency>

With Spring Boot version 2.3.2.RELEASE.

einverne avatar Jan 08 '21 13:01 einverne