diff --git a/build.gradle b/build.gradle index 95d29095..3e2e582b 100644 --- a/build.gradle +++ b/build.gradle @@ -82,7 +82,7 @@ jar { into 'dist/lib' } copy { - from file('src/main/resources/application.yml') + from file('src/main/resources/application-template.yml') into 'dist/conf/' } copy { diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml deleted file mode 100644 index f9a41207..00000000 --- a/src/main/resources/application-dev.yml +++ /dev/null @@ -1,39 +0,0 @@ -server: - servlet: - session: - timeout: 5m - cookie: - max-age: -1 -spring: - datasource: - url: jdbc:mysql://127.0.0.1:3306/dl?useSSL=false -#type: com.alibaba.druid.pool.DruidDataSource - username: root - password: ${SPRING_DATASOURCE_PASSWORD} - jpa: - hibernate: - ddl-auto: update - generate-ddl: true - show-sql: true - database-platform: org.hibernate.dialect.MySQL5Dialect - mail: - host: smtp.gmail.com - port: 587 - username: yanyanho126@gmail.com - password: ${GMAIL_PASSWORD} - properties: - mail: - smtp: - auth: true - ssl: - enable: true - starttls: - enable: true - session: - store-type: jdbc - jdbc: - initialize-schema: always - cleanup-cron: 0 */3 * * * * - timeout: - seconds: 900 - diff --git a/src/main/resources/application-template.yml b/src/main/resources/application-template.yml new file mode 100644 index 00000000..411fe129 --- /dev/null +++ b/src/main/resources/application-template.yml @@ -0,0 +1,60 @@ +server: + port: 8080 + servlet: + session: + timeout: 6m + cookie: + max-age: -1 +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/dl?allowPublicKeyRetrieval=true&useSSL=false + #type: com.alibaba.druid.pool.DruidDataSource + username: root + # password: 12345678 + password: {{SPRING_DATASOURCE_PASSWORD}} + jpa: + hibernate: + ddl-auto: update + generate-ddl: true + show-sql: true + database-platform: org.hibernate.dialect.MySQL5Dialect + mail: + host: smtp.gmail.com + port: 587 + username: yanyanho126@gmail.com + password: ${GMAIL_PASSWORD} + properties: + mail: + smtp: + auth: true + ssl: + enable: true + starttls: + enable: true + session: + store-type: jdbc + jdbc: + initialize-schema: always + cleanup-cron: 0 */3 * * * * + timeout: 7200 + +logging: + level: + org.springframework.security: debug + +ipfs: + url: /ip4/127.0.0.1/tcp/5001 + +web3j: + client-address: "https://polygon-rpc.com" + +oauth: + registrations: + github: + clientId: "Iv1.74aecf988af67044" + clientSecret: "d0f38f58e98bb3dbb9a6bf6a2e1211a4feb24767" + accessTokenUri: https://github.com/login/oauth/access_token + userAuthorizationUri: https://github.com/login/oauth/authorize + userInfoUri: https://api.github.com/user + + diff --git a/start.sh b/start.sh index a617600f..ec7cfe69 100644 --- a/start.sh +++ b/start.sh @@ -5,7 +5,7 @@ CLASSPATH='conf/:apps/*:lib/*' CURRENT_DIR=$(pwd)/ LOG_DIR=${CURRENT_DIR}log CONF_DIR=${CURRENT_DIR}conf -cat conf/application.yml | sed "s/{{SPRING_DATASOURCE_PASSWORD}}/$DBPWD/g" conf/application.yml > conf/application.yml +cat conf/application.yml | sed "s/{{SPRING_DATASOURCE_PASSWORD}}/$DBPWD/g" conf/application-template.yml > conf/application.yml SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//') if [ ${SERVER_PORT}"" = "" ];then echo "$CONF_DIR/application.yml server port has not been configured"