Skip to content

Commit cabc933

Browse files
committed
SQLite config is added into application.properties file
1 parent 8f1cafb commit cabc933

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/main/java/az/mm/developerjobs/config/Config.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

22
package az.mm.developerjobs.config;
33

4-
import javax.sql.DataSource;
5-
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
64
import org.springframework.context.annotation.Bean;
75
import org.springframework.context.annotation.Configuration;
86
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
@@ -22,11 +20,17 @@ public ReloadableResourceBundleMessageSource messageSource() {
2220
return messageSource;
2321
}
2422

23+
24+
/*
25+
//This config is added into application.properties file
26+
2527
@Bean
2628
public DataSource dataSource() {
2729
DataSourceBuilder dataSourceBuilder = DataSourceBuilder.create();
2830
dataSourceBuilder.driverClassName("org.sqlite.JDBC");
2931
dataSourceBuilder.url("jdbc:sqlite:D:\\developer_jobs.sqlite");
3032
return dataSourceBuilder.build();
3133
}
34+
*/
35+
3236
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
spring.mvc.view.prefix: /WEB-INF/jsp/
22
spring.mvc.view.suffix: .jsp
33

4-
# MAIL PROPERTIES#
4+
# MAIL PROPERTIES #
55
spring.mail.host = smtp.gmail.com
66
spring.mail.port = 587
77
spring.mail.username = your-mail@gmail.com
88
spring.mail.password = password
99
spring.mail.properties.mail.smtp.auth = true
1010
spring.mail.properties.mail.smtp.starttls.enable = true
1111

12+
13+
# DB PROPERTIES #
14+
spring.datasource.url = jdbc:sqlite:D:\\developer_jobs.sqlite
15+
spring.datasource.driver-class-name = org.sqlite.JDBC
1216
#spring.jpa.show-sql=true
1317
#spring.jpa.properties.hibernate.format_sql=true

0 commit comments

Comments
 (0)