diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..fa88218 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,30 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://192.168.31.127:3780 + + + + + + $ProjectFileDir$ + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://192.168.31.127:3780/bookstore + + + + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a6bdf3b..293d4cb 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,12 +3,29 @@ server: spring: application: name: bookstore + jpa: + hibernate: + ddl-auto: update + show-sql: true + +--- +spring: + config: + activate: + on-profile: h2 datasource: url: jdbc:h2:file:./database;DB_CLOSE_ON_EXIT=FALSE driver-class-name: org.h2.Driver username: lanyuanxiaoyao password: lanyuanxiaoyao - jpa: - hibernate: - ddl-auto: update - show-sql: true \ No newline at end of file + +--- +spring: + config: + activate: + on-profile: mysql-local + datasource: + url: jdbc:mysql://192.168.31.127:3780/bookstore + driver-class-name: com.mysql.cj.jdbc.Driver + username: bookstore + password: EzSn+RZ*x2&fHFh9kC+H