From 3947e884db031e336548083e7e43b1f7c1e734f3 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 05 十月 2023 10:25:14 +0800
Subject: [PATCH] 添加mysql依赖

---
 src/main/java/com/smartearth/poiexcel/controller/OrgPoiController.java |    2 +-
 src/main/resources/application.properties                              |   10 +++++++++-
 pom.xml                                                                |   30 ++++++++++++++++++++++++++++--
 3 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index cfb4acd..cc6dc14 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
     </parent>
     <groupId>com.smartearth</groupId>
     <artifactId>poiExcel</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
+    <version>0.0.1</version>
     <name>poiExcel</name>
     <description>poiExcel</description>
     <properties>
@@ -111,12 +111,38 @@
             <artifactId>cglib</artifactId>
             <version>3.1</version>
         </dependency>
-
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <!--mybatis-plus-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.5.1</version>
+        </dependency>
+        <!--druid-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.1.22</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.22</version>
+        </dependency>
+        <!--mysql-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <!--jdbc-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-jdbc</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/src/main/java/com/smartearth/poiexcel/controller/OrgPoiController.java b/src/main/java/com/smartearth/poiexcel/controller/OrgPoiController.java
index 5096c21..29ef6e2 100644
--- a/src/main/java/com/smartearth/poiexcel/controller/OrgPoiController.java
+++ b/src/main/java/com/smartearth/poiexcel/controller/OrgPoiController.java
@@ -218,7 +218,7 @@
                         String formatted_address = object.getString("formatted_address");
                         if (!StringUtils.isEmpty(formatted_address)) {
                             String encoding = getEncoding(formatted_address);
-                            log.info("encoding: {}", encoding);
+                            //log.info("encoding: {}", encoding);
                             if (!"UTF-8".equals(encoding) && !"".equals(encoding)) {
                                 formatted_address = new String(formatted_address.getBytes(encoding), "UTF-8");
                             }
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 8b09fd3..164d484 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -4,4 +4,12 @@
 #address.code.url=http://172.26.64.84/service/AddrCode/cmd
 address.code.url=http://192.162.29.2:8081/proxy/address/service/AddrCode/cmd
 excel.export.dir=D:\\excel\\
-#excel.export.dir=/Users/mahui/excel
\ No newline at end of file
+#excel.export.dir=/Users/mahui/excel
+
+# 数据源配置
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.driverClassName=com.mysql.jdbc.Driver
+spring.datasource.url: jdbc:mysql://127.0.0.1:3306/yssh?useUnicode=true&rewriteBatchedStatements=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
+spring.datasource.username=root
+spring.datasource.password=mysql
+

--
Gitblit v1.9.3