Hi, all i am facing this issue:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-07-08 13:49:05.040 web-bff - ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] [Thread-ID: main] -

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

Description:

Field dataSource in ********.PersistenceJPAConfig required a bean of type 'javax.sql.DataSource' that could not be found.
        - Bean method 'dataSource' not loaded because @ConditionalOnProperty (spring.datasource.type) did not find property 'spring.datasource.type'
        - Bean method 'dataSource' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
        - Bean method 'dataSource' not loaded because @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) did not find any beans

My configuration class is:

@EnableTransactionManagement
@EnableJpaRepositories(basePackages = "eu.unicredit.ubis.pillar2.persistence.repository", repositoryBaseClass = CustomRepositoryImpl.class)
@Configuration
public class PersistenceJPAConfig {

    @Autowired
    @Qualifier(value = DbDataSource.P_2_DATA_SOURCE)
    private DataSource dataSource;

in the pom i have:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

My class PersistenceJPAConfig is placed in a submodule where its pom has also the spring-boot-starter-data-jpa dependency.

My application.yml has:

spring:
  datasource:
    driver-class-name: to-be-provided
    url: to-be-provided
    username: to-be-provided
    password: to-be-provided
  jpa:
    show-sql: true

I am using spring-boot version 1.5.10

How should i solve it?

Thanks

Comment From: wilkinsona

Spring Boot 1.5.x is no longer supported. Please upgrade to Spring Boot 2.4.x or later at your earliest convenience. If your problem remains, please let us know and we can re-open this issue and take another look.