Skip to content

Commit cf1615a

Browse files
committed
Add Yaml configurations to the project
1 parent cb4ea4e commit cf1615a

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

note-system-back-end.iml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,5 @@
8484
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.19.4" level="project" />
8585
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
8686
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
87-
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" />
8887
</component>
8988
</module>

src/main/java/lk/ijse/dep/note/config/JpaConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import javax.xml.crypto.Data;
2020

2121
@Configuration
22-
@PropertySource("classpath:application.yml")
2322
@EnableTransactionManagement
2423
public class JpaConfig {
2524
@Autowired
@@ -33,6 +32,7 @@ public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource ds
3332
return lcmfb;
3433
}
3534

35+
@Bean
3636
public JpaVendorAdapter jpaVendorAdapter(){
3737
HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter();
3838
jpaVendorAdapter.setShowSql(env.getProperty("jpa.show-sql",Boolean.class,false));

src/main/resources/application.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
jpa:
2-
show-sql:true
3-
generate-ddl:true
4-
dialect:org.hibernate.dialect.MySQL8Dialect
2+
show-sql: true
3+
generate-ddl: true
4+
dialect: org.hibernate.dialect.MySQL8Dialect
55

66
hikari:
7-
jdbc-url:jdbc:mysql//localhost:3306/dep8_notes?createDatabaseIfNotExist=true
8-
username:root
9-
password:12345678
10-
driver-classname:com.mysql.cj.jdbc.Driver
11-
max-pool-size:10
7+
jdbc-url: jdbc:mysql://localhost:3306/dep8_notes?createDatabaseIfNotExist=true
8+
username: root
9+
password: 12345678
10+
driver-classname: com.mysql.cj.jdbc.Driver
11+
max-pool-size: 10

0 commit comments

Comments
 (0)