jlefebure / spring-boot-starter-minio

Minio starter for Spring Boot
Apache License 2.0
151 stars 70 forks source link

Spring-boot-starter-minio does not work after migrating to spring boot 3 #28

Open vahidi-zahra70 opened 1 year ago

vahidi-zahra70 commented 1 year ago

I have an app using spring boot and minio. I use this dependency for minio:

        <dependency>
            <groupId>com.jlefebure</groupId>
            <artifactId>spring-boot-starter-minio</artifactId>
            <version>1.4</version>
        </dependency>

When I migrated my app from spring boot 2.3.8.RELEASE to spring boot 3.0.2, I got the following error during the start up:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in ir.co.sadad.bam.digitalauthentication.provider.IdentityInfoProviderMockImpl required a bean of type 'com.jlefebure.spring.boot.minio.MinioService' that could not be found.

Action:

Consider defining a bean of type 'com.jlefebure.spring.boot.minio.MinioService' in your configuration.

According to this link: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#auto-configuration-files In spring boot 3.0.2 the spring.factories file has been replaced with this file: "INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports". However, this dependency still uses "spring.facatories" file to auto configure the beans and I think that's why after migration it doesn't work.