spring-data-sqlite icon indicating copy to clipboard operation
spring-data-sqlite copied to clipboard

Running mvcWebTest

Open benjamin-dreux opened this issue 6 months ago • 1 comments

I've noticed this error

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

Description:

Parameter 0 of method setDataAccessStrategy in org.komamitsu.spring.data.sqlite.SqliteJdbcRepositoryFactoryBean required a bean of type 'org.springframework.data.jdbc.core.convert.DataAccessStrategy' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.data.jdbc.core.convert.DataAccessStrategy' in your configuration.

I'm unsure if it's a spring-data-jdbc specific error. The thing is my app is running fine in production mode.

benjamin-dreux avatar May 29 '25 23:05 benjamin-dreux

It feels weird since my tests only mock calls to my repository. So i'm not expecting to really start sqllite repositories

benjamin-dreux avatar May 29 '25 23:05 benjamin-dreux

By not enabling sqlliterepositories the previsouly mentioned eror did not manifest

@SpringBootApplication
//@EnableSqliteRepositories
public class MyApplication {
    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);
    }
}

So I assume that spring-data-sqllite start something by default that should not always be started. Still don't know what or how

benjamin-dreux avatar May 31 '25 10:05 benjamin-dreux

Hmm, I'm not quite sure what you're trying to do... Would it be possible for you to share a minimal reproducible example (or project)?

komamitsu avatar Jun 01 '25 12:06 komamitsu