Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
arc0035 committed Nov 1, 2023
1 parent 70656b8 commit aa4021d
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 41 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
39 changes: 0 additions & 39 deletions src/main/resources/application-dev.yml

This file was deleted.

60 changes: 60 additions & 0 deletions src/main/resources/application-template.yml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
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


2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit aa4021d

Please sign in to comment.