From 58c4ea43d45be49d44d3c74a2b47466e5791bb1e Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 16:23:55 +0800 Subject: [PATCH 1/7] ADD file via upload --- src/main/java/com/utils/MD5Utils.java | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/com/utils/MD5Utils.java diff --git a/src/main/java/com/utils/MD5Utils.java b/src/main/java/com/utils/MD5Utils.java new file mode 100644 index 0000000..43657b0 --- /dev/null +++ b/src/main/java/com/utils/MD5Utils.java @@ -0,0 +1,28 @@ +package com.utils; + +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +/** + * @ClassName MD5Utils + * @Description TODO + * @Author YHT + * @Date 2021/5/29 19:10 + */ +public class MD5Utils { + public static String stringToMD5(String plainText) { + byte[] secretBytes = null; + try { + secretBytes = MessageDigest.getInstance("md5").digest( + plainText.getBytes()); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("没有这个md5算法!"); + } + String md5code = new BigInteger(1, secretBytes).toString(16); + for (int i = 0; i < 32 - md5code.length(); i++) { + md5code = "0" + md5code; + } + return md5code; + } +} \ No newline at end of file From b5eaf42dfb8de1fd892aadfb7e321232f617a6a6 Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 16:24:27 +0800 Subject: [PATCH 2/7] Delete 'src/main/java/com/utils/Page.java' --- src/main/java/com/utils/Page.java | 72 ------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/main/java/com/utils/Page.java diff --git a/src/main/java/com/utils/Page.java b/src/main/java/com/utils/Page.java deleted file mode 100644 index 58370ef..0000000 --- a/src/main/java/com/utils/Page.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.utils; - -/** - * 分页实体类:存储当前页所有分页相关的数据 - */ -public class Page { - //起始位置 - public int start = 0; - //每页现实的条数 - public int count = 3; - //结束位置 - public int last = 0; - //当前页的页码 - public int currentIndex = 1; - //总共的页数 - public int totalIndex; - public int getStart() { - return start; - } - public void setStart(int start) { - this.start = start; - } - public int getCount() { - return count; - } - public void setCount(int count) { - this.count = count; - } - public int getLast() { - return last; - } - public void setLast(int last) { - this.last = last; - } - - public int getCurrentIndex() { - return currentIndex; - } - - public void setCurrentIndex(int currentIndex) { - this.currentIndex = currentIndex; - } - - public int getTotalIndex() { - return totalIndex; - } - - public void setTotalIndex(int totalIndex) { - this.totalIndex = totalIndex; - } - - public Page() { - } - - public void calculateLast(int total) { - - if(0==total%count) { - last = total-count; - }else { - last = total-total%count; - } - } - - @Override - public String toString() { - return "Page{" + - "start=" + start + - ", count=" + count + - ", last=" + last + - '}'; - } -} \ No newline at end of file From d69d432f17bda4dec71cc80219a9b6c63205c9b9 Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 16:24:54 +0800 Subject: [PATCH 3/7] ADD file via upload --- src/main/java/com/utils/Page.java | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/main/java/com/utils/Page.java diff --git a/src/main/java/com/utils/Page.java b/src/main/java/com/utils/Page.java new file mode 100644 index 0000000..58370ef --- /dev/null +++ b/src/main/java/com/utils/Page.java @@ -0,0 +1,72 @@ +package com.utils; + +/** + * 分页实体类:存储当前页所有分页相关的数据 + */ +public class Page { + //起始位置 + public int start = 0; + //每页现实的条数 + public int count = 3; + //结束位置 + public int last = 0; + //当前页的页码 + public int currentIndex = 1; + //总共的页数 + public int totalIndex; + public int getStart() { + return start; + } + public void setStart(int start) { + this.start = start; + } + public int getCount() { + return count; + } + public void setCount(int count) { + this.count = count; + } + public int getLast() { + return last; + } + public void setLast(int last) { + this.last = last; + } + + public int getCurrentIndex() { + return currentIndex; + } + + public void setCurrentIndex(int currentIndex) { + this.currentIndex = currentIndex; + } + + public int getTotalIndex() { + return totalIndex; + } + + public void setTotalIndex(int totalIndex) { + this.totalIndex = totalIndex; + } + + public Page() { + } + + public void calculateLast(int total) { + + if(0==total%count) { + last = total-count; + }else { + last = total-total%count; + } + } + + @Override + public String toString() { + return "Page{" + + "start=" + start + + ", count=" + count + + ", last=" + last + + '}'; + } +} \ No newline at end of file From 42a12702935f480946a753b159aa75eee7ccc325 Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 17:13:56 +0800 Subject: [PATCH 4/7] ADD file via upload --- .../resources/applicationContext-mybatis.xml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/main/resources/applicationContext-mybatis.xml diff --git a/src/main/resources/applicationContext-mybatis.xml b/src/main/resources/applicationContext-mybatis.xml new file mode 100644 index 0000000..0096852 --- /dev/null +++ b/src/main/resources/applicationContext-mybatis.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 7058d07098cba0a1f599eb6b25badf9bae2fbab0 Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 17:14:30 +0800 Subject: [PATCH 5/7] ADD file via upload --- .../applicationContext-SpringMVC.xml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/main/resources/applicationContext-SpringMVC.xml diff --git a/src/main/resources/applicationContext-SpringMVC.xml b/src/main/resources/applicationContext-SpringMVC.xml new file mode 100644 index 0000000..6f26f75 --- /dev/null +++ b/src/main/resources/applicationContext-SpringMVC.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 9cd1bb96dca00011f64a912e36d0699b9c0fdae5 Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 17:14:59 +0800 Subject: [PATCH 6/7] ADD file via upload --- src/main/resources/jdbc.properties | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/resources/jdbc.properties diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties new file mode 100644 index 0000000..4bcb7e4 --- /dev/null +++ b/src/main/resources/jdbc.properties @@ -0,0 +1,14 @@ +driver=com.mysql.jdbc.Driver +url=jdbc:mysql://127.0.0.1:3306/sp_emp +username=root +password=root +#ʼ +initialSize=0 +# +maxActive=20 +# +maxIdle=20 +#С +minIdle=1 +#ȴʱ +maxWait=60000 \ No newline at end of file From a0a57648d6557d9d8fe50cf42836f8a100dc648f Mon Sep 17 00:00:00 2001 From: py2tc4x5b <2058109913@qq.com> Date: Mon, 10 Apr 2023 17:15:22 +0800 Subject: [PATCH 7/7] ADD file via upload --- src/main/resources/log4j.properties | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/resources/log4j.properties diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 0000000..153bf09 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,19 @@ +#LOG +log4j.rootLogger=INFO,Console,File +#־ĿĵΪ̨ +log4j.appender.Console=org.apache.log4j.ConsoleAppender +log4j.appender.Console.Target=System.out +#ָ־ʽһָĸʽ +log4j.appender.Console.layout = org.apache.log4j.PatternLayout +log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n + +#ļСָߴʱһµļ +log4j.appender.File = org.apache.log4j.RollingFileAppender +#ָĿ¼ +log4j.appender.File.File = logs/ssm.log +#ļС +log4j.appender.File.MaxFileSize = 10MB +# ־DEBUGʾDEBUGϼ־ +log4j.appender.File.Threshold = ALL +log4j.appender.File.layout = org.apache.log4j.PatternLayout +log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n \ No newline at end of file