From c15c7378e260125e75e78009ed66449ab5ff2046 Mon Sep 17 00:00:00 2001 From: lijiantao Date: Mon, 1 Jul 2019 18:04:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98;=20=E8=AE=BE=E7=BD=AEpom.x?= =?UTF-8?q?ml-profile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- antdsp-admin/pom.xml | 26 +++++++++++++ .../src/main/resources/application.yml | 22 ++++++++++- .../src/main/resources/logback-spring.xml | 37 +++++++++++++++++++ .../src/main/web/src/custom/UnipicUpload.js | 10 ++--- 4 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 antdsp-admin/src/main/resources/logback-spring.xml diff --git a/antdsp-admin/pom.xml b/antdsp-admin/pom.xml index ed1d23d..78bdd96 100644 --- a/antdsp-admin/pom.xml +++ b/antdsp-admin/pom.xml @@ -72,4 +72,30 @@ + + + dev + + true + + + jdbc:mysql://192.168.1.231:3306/antdsp?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai + root + 123456 + com.mysql.cj.jdbc.Driver + com.alibaba.druid.pool.DruidDataSource + + logs + + TnmENtV4x4oG0qfnXY3gSAmLplBw9bvRJ3IKS0X1 + nMKAApnVrmBDifwuT5Pq5V33XhNOgcT4njErx5fV + antdsp + + + + src/main/resources/application.yml + + + + \ No newline at end of file diff --git a/antdsp-admin/src/main/resources/application.yml b/antdsp-admin/src/main/resources/application.yml index fcfadf9..865e464 100644 --- a/antdsp-admin/src/main/resources/application.yml +++ b/antdsp-admin/src/main/resources/application.yml @@ -2,6 +2,8 @@ antdsp: name: antdsp version: 0.0.1 copyrightYear: 2019 + logback: + filepath: @antdsp.logback.filepath@ server: servlet: context-path: /antdsp-api @@ -9,9 +11,25 @@ server: timeout: 30 port: 8088 spring: - profiles: - active: dev + datasource: + type: @antdsp.db.datasource@ + driver-class-name: @antdsp.db.driver@ + url: @antdsp.db.url@ + username: @antdsp.db.username@ + password: @antdsp.db.password@ + initial-size: 10 + jpa: + hibernate: + ddl-auto: update + show-sql: true + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect application: name: antdsp aop: auto: true #启动Spring AOP 配置 + +qiniu: + accessKey: @qiniu.accessKey@ + secretKey: @qiniu.secretKey@ + bucket: @qiniu.bucket@ + diff --git a/antdsp-admin/src/main/resources/logback-spring.xml b/antdsp-admin/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..c0a5b04 --- /dev/null +++ b/antdsp-admin/src/main/resources/logback-spring.xml @@ -0,0 +1,37 @@ + + + + + + + + + ${LOG_PATTERN} + UTF-8 + + + + + + ${FILE_PATH}/antdsp.log + + ${LOG_PATTERN} + UTF-8 + + + + ${FILE_PATH}/antdsp-%d{yyyy-MM-dd}.%i.log + + 30 + + 10MB + + + + + + + + + + \ No newline at end of file diff --git a/antdsp-admin/src/main/web/src/custom/UnipicUpload.js b/antdsp-admin/src/main/web/src/custom/UnipicUpload.js index d248ec6..797e436 100644 --- a/antdsp-admin/src/main/web/src/custom/UnipicUpload.js +++ b/antdsp-admin/src/main/web/src/custom/UnipicUpload.js @@ -10,9 +10,9 @@ export default class UnipicUpload extends PureComponent{ } componentWillReceiveProps(newProps){ - const { image } = this.props; + const { value } = newProps; this.setState({ - imgUrl: image + imgUrl: value }) } @@ -41,10 +41,8 @@ export default class UnipicUpload extends PureComponent{ if (info.file.status === 'done') { const response = info.file.response; + this.setState({loading: false}); if(response.success){ - this.setState({ - imgUrl: response.message - }); onChange(response.message); } } @@ -65,7 +63,7 @@ export default class UnipicUpload extends PureComponent{ onChange={this.handlerUploadOnChange} > { - imgUrl ? + !this.state.loading && imgUrl ? :
-- Gitee From 4bbd1333f5651a7ce57364499df72e1ffd92b9ac Mon Sep 17 00:00:00 2001 From: lijiantao Date: Tue, 2 Jul 2019 09:41:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4dev.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 antdsp-admin/src/main/resources/application-dev.yml diff --git a/antdsp-admin/src/main/resources/application-dev.yml b/antdsp-admin/src/main/resources/application-dev.yml deleted file mode 100644 index cb6fc7f..0000000 --- a/antdsp-admin/src/main/resources/application-dev.yml +++ /dev/null @@ -1,19 +0,0 @@ -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://192.168.1.231:3306/antdsp?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai - username: root - password: 123456 - initial-size: 10 - jpa: - hibernate: - ddl-auto: update - show-sql: true - database-platform: org.hibernate.dialect.MySQL5InnoDBDialect - -qiniu: - accessKey: xxx - secretKey: xxx - bucket: antdsp - \ No newline at end of file -- Gitee From 4555fffb21046b926a57cfa91821d08eccf5c91f Mon Sep 17 00:00:00 2001 From: lijiantao Date: Tue, 2 Jul 2019 09:42:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?gitignore=20=E6=96=87=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + antdsp-admin/.gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 518e502..8ce455a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ 。DS_Store */target/* */.settings/* +*/logs/* diff --git a/antdsp-admin/.gitignore b/antdsp-admin/.gitignore index b83d222..58da1f7 100644 --- a/antdsp-admin/.gitignore +++ b/antdsp-admin/.gitignore @@ -1 +1,2 @@ /target/ +/logs/ -- Gitee