dataSource()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
1
package com.osomapps.pt.config;
2
3
import javax.sql.DataSource;
4
import org.springframework.boot.context.properties.ConfigurationProperties;
5
import org.springframework.boot.jdbc.DataSourceBuilder;
6
import org.springframework.context.annotation.Bean;
7
import org.springframework.context.annotation.Configuration;
8
9
@Configuration
10
class PersistenceConfiguration {
11
    @Bean
12
    @ConfigurationProperties(prefix = "spring.datasource")
13
    DataSource dataSource() {
14
        return DataSourceBuilder.create().build();
15
    }
16
}
17