diff --git a/DataStructures_Algorithm/DataStructures/pom.xml b/DataStructures_Algorithm/DataStructures/pom.xml new file mode 100644 index 0000000..e36fa45 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/pom.xml @@ -0,0 +1,27 @@ + + + + DataStructures_Algorithm + com.atguigu.DataStructures_Algorithm + 1.0-SNAPSHOT + + 4.0.0 + + DataStructures + + + + org.apache.maven.plugins + maven-compiler-plugin + + 7 + 7 + + + + + + + \ No newline at end of file diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/avl/AVLTreeDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/avl/AVLTreeDemo.java new file mode 100644 index 0000000..486f7ea --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/avl/AVLTreeDemo.java @@ -0,0 +1,348 @@ +package com.atguigu.avl; + +public class AVLTreeDemo { + + public static void main(String[] args) { + + int[] arr={10, 11, 7, 6, 8, 9 }; + //创建一个AVLTree + AVLTree avlTree = new AVLTree(); + + //添加节点 + for (int i = 0; i < arr.length; i++) { + avlTree.add(new Node(arr[i])); + } + + //遍历 + System.out.println("中序遍历"); + avlTree.midOrder(); + + System.out.println("做平衡处理"); + System.out.println("树的高度="+avlTree.root.height()); //3 + System.out.println("左子树的高度="+avlTree.root.left.height()); //2 + System.out.println("右子树的高度="+avlTree.root.right.height()); //2 + System.out.println(avlTree.root); + + + } + + +} + +//创建AVLTree +class AVLTree{ + public Node root; + + //查找要删除的节点 + public Node search(int value){ + + if(root ==null){ + return null; + }else { + return root.search(value); + } + + } + + //查找父节点 + public Node searchParent(int value){ + if(root ==null){ + return null; + }else { + return root.searchParent(value); + } + + } + + /** + *1.返回以node为根节点的二叉排序树的最小节点的值 + * 2.删除node为根节点的二叉排序树的最小节点 + * @param node 传入的节点(当做二叉排序树的根节点) + * @return 返回以node为根节点的二叉排序树的最小节点的值 + */ + public int delRightTreeMin(Node node){ + + Node min =node; + //U型你换查找左节点,就会找到最小值 + while(min.left !=null){ + min=min.left; + } + //这时min指向了最小的节点 + //删除最小节点 + delNode(min.value); + return min.value; + + } + + //删除节点 + public void delNode(int value){ + + if(root ==null){ + return; + }else { + + //1.找到要删除的节点targetNode + Node targetNode = search(value); + if(targetNode==null){ + return; + } + //如果当前二叉排序树只有一个节点 + if(root.left==null&&root.right==null){ + root=null; + return; + } + + //去找到targetNode的父节点 + Node parent = searchParent(value); + + //如果要删除的节点是叶子节点 + if(targetNode.left==null&&targetNode.right==null){ + //判断targetNode是父节点的左子节点,还是右子节点 + if(parent.left!=null&&parent.left.value==targetNode.value){ + parent.left=null; + }else if(parent.right!=null&&parent.right.value==targetNode.value){ + parent.right=null; + } + + }else if(targetNode.left !=null && targetNode.right!=null){ + int minVal = delRightTreeMin(targetNode.right); + targetNode.value=minVal; + + + }else { + //删除只有一颗子树的节点 + + //左子节点 + if(targetNode.left !=null){ + if(parent !=null){ + if(parent.left.value==value){ + parent.left=targetNode.left; + }else { + parent.right=targetNode.right; + } + }else { + root=targetNode.left; + } + + }else { + if(parent !=null){ + if(parent.left.value==value){ + parent.left=targetNode.right; + }else { + parent.right=targetNode.right; + } + }else { + root=targetNode.right; + } + + } + } + } + } + + //添加节点的方法 + public void add(Node node){ + if(root==null){ + root=node; + }else { + root.add(node); + } + + } + + //中序遍历 + public void midOrder(){ + if(root!=null){ + root.midOrder(); + }else { + System.out.println("当前二叉排序树为空"); + } + } + +} + +class Node { + + int value; + Node left; + Node right; + + public Node(int value) { + this.value = value; + } + + //返回左子树的高度 + public int leftHeight(){ + if(left==null){ + return 0; + } + return left.height(); + } + //返回左子树的高度 + public int rightHeight(){ + if(right==null){ + return 0; + } + return right.height(); + } + + //返回当前节点的高度,以该节点为根节点的数的高度 + public int height() { + return Math.max(left == null ? 0 : left.height(), right == null ? 0 : right.height()) + 1; + } + + //左旋转 + public void leftRotate(){ + + //创建新的节点,以当前根节点的值 + Node newNode = new Node(value); + //把新的节点的左子树设置为当前节点的左子树 + newNode.left=this.left; + //把新的节点的右子树设置成当前节点的右子树的左子树 + newNode.right=this.right.left; + //把当前节点的值替换成右子节点值 + this.value=this.right.value; + //把当前节点的右子树设置成当前节点的右子树的右子树 + this.right=this.right.right; + //把当前节点的左子树设置成新的节点 + this.left=newNode; + + } + + //右旋转 + public void rightRotate(){ + + Node newNode = new Node(value); + newNode.right=this.right; + newNode.left=this.left.right; + this.value=this.left.value; + this.left=this.left.left; + this.right=newNode; + + } + + /** + * 查找要删除的节点 + * + * @param value 希望要删除的节点的值 + * @return 如果找到返回该节点, 否则返回null + */ + //查找要删除的节点 + public Node search(int value) { + if (value == this.value) { + return this; + } else if (value < this.value) { + //查找的值小于当前节点,想左子树递归查找 + if (this.left == null) { + return null; + } else { + return this.left.search(value); + } + } else { + //查找的值大于等于当前节点,想左子树递归查找 + if (this.right == null) { + return null; + } else { + return this.right.search(value); + } + } + } + + /** + * 查找要删除节点的父节点 + * + * @param value 要找到的节点的值 + * @return 返回要删除节点的父节点, 如果没有就返回null + */ + public Node searchParent(int value) { + + if ((this.left != null && this.left.value == value) || (this.right != null && this.right.value == value)) { + return this; + } else { + + //如果查找的值小于当前节点的值,并且当前节点的左子节点不为空 + if (this.value > value && this.left != null) { + return this.left.searchParent(value); //向左子树递归查找 + } else if (this.value <= value && this.right != null) { + return this.right.searchParent(value); //向右子数递归查找 + } else { + return null; //没有找到父节点 + } + } + + } + + //递归的形式添加节点,满足二叉排序树的要求 + public void add(Node node) { + + if (node == null) { + return; + } + + //判断传入的节点的值和当前 + if (node.value < this.value) { + if (this.left == null) { + this.left = node; + } else { + this.left.add(node); + } + } else { + if (this.right == null) { + this.right = node; + } else { + this.right.add(node); + } + } + + //当添加完一个节点后,如果:(右子树高度-左子树的高度)>1,左旋转 + if(rightHeight()-leftHeight()>1){ + + if(right !=null &&right.rightHeight()1,右旋转 + if(leftHeight()-rightHeight()>1){ + + if(left !=null &&left.rightHeight()>left.leftHeight()){ + //先对当前节点的左子树进行左旋转 + left.leftRotate(); + //再对当前节点进行右旋转 + rightRotate(); + }else { + //直接进行右旋转 + rightRotate(); + } + } + + } + + //中序遍历 + public void midOrder() { + if (this == null) { + System.out.println("当前子树为空,无法遍历"); + } + + if (this.left != null) { + this.left.midOrder(); + } + System.out.println(this); + if (this.right != null) { + this.right.midOrder(); + } + } + + @Override + public String toString() { + return "Node{" + + "value=" + value + + '}'; + } +} + diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/binarysorttree/BinarySortTreeDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/binarysorttree/BinarySortTreeDemo.java new file mode 100644 index 0000000..0ba730e --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/binarysorttree/BinarySortTreeDemo.java @@ -0,0 +1,261 @@ +package com.atguigu.binarysorttree; + +public class BinarySortTreeDemo { + + public static void main(String[] args) { + + int[] arr={7,3,11,12,5,1,9,2,10}; + BinarySortTree binarySortTree = new BinarySortTree(); + //循环的添加节点到二叉排序树 + for (int i = 0; i < arr.length; i++) { + binarySortTree.add(new Node(arr[i])); + } + //中序遍历 + System.out.println("中序遍历二叉排序树"); + binarySortTree.midOrder(); //1 2 3 5 7 9 10 12 + + //测试删除叶子结点 + binarySortTree.delNode(11); + System.out.println("删除后的中序遍历:"); + binarySortTree.midOrder(); + + + } +} +//创建二叉排序树 +class BinarySortTree{ + public Node root; + + //查找要删除的节点 + public Node search(int value){ + + if(root ==null){ + return null; + }else { + return root.search(value); + } + + } + + //查找父节点 + public Node searchParent(int value){ + if(root ==null){ + return null; + }else { + return root.searchParent(value); + } + + } + + /** + *1.返回以node为根节点的二叉排序树的最小节点的值 + * 2.删除node为根节点的二叉排序树的最小节点 + * @param node 传入的节点(当做二叉排序树的根节点) + * @return 返回以node为根节点的二叉排序树的最小节点的值 + */ + public int delRightTreeMin(Node node){ + + Node min =node; + //U型你换查找左节点,就会找到最小值 + while(min.left !=null){ + min=min.left; + } + //这时min指向了最小的节点 + //删除最小节点 + delNode(min.value); + return min.value; + + } + + //删除节点 + public void delNode(int value){ + + if(root ==null){ + return; + }else { + + //1.找到要删除的节点targetNode + Node targetNode = search(value); + if(targetNode==null){ + return; + } + //如果当前二叉排序树只有一个节点 + if(root.left==null&&root.right==null){ + root=null; + return; + } + + //去找到targetNode的父节点 + Node parent = searchParent(value); + + //如果要删除的节点是叶子节点 + if(targetNode.left==null&&targetNode.right==null){ + //判断targetNode是父节点的左子节点,还是右子节点 + if(parent.left!=null&&parent.left.value==targetNode.value){ + parent.left=null; + }else if(parent.right!=null&&parent.right.value==targetNode.value){ + parent.right=null; + } + + }else if(targetNode.left !=null && targetNode.right!=null){ + int minVal = delRightTreeMin(targetNode.right); + targetNode.value=minVal; + + + }else { + //删除只有一颗子树的节点 + + //左子节点 + if(targetNode.left !=null){ + if(parent !=null){ + if(parent.left.value==value){ + parent.left=targetNode.left; + }else { + parent.right=targetNode.right; + } + }else { + root=targetNode.left; + } + + }else { + if(parent !=null){ + if(parent.left.value==value){ + parent.left=targetNode.right; + }else { + parent.right=targetNode.right; + } + }else { + root=targetNode.right; + } + + } + } + } + } + + //添加节点的方法 + public void add(Node node){ + if(root==null){ + root=node; + }else { + root.add(node); + } + + } + + //中序遍历 + public void midOrder(){ + if(root!=null){ + root.midOrder(); + }else { + System.out.println("当前二叉排序树为空"); + } + } + +} + +class Node{ + + int value; + Node left; + Node right; + + public Node(int value) { + this.value = value; + } + + /** + * 查找要删除的节点 + * @param value 希望要删除的节点的值 + * @return 如果找到返回该节点,否则返回null + */ + //查找要删除的节点 + public Node search(int value){ + if(value ==this.value){ + return this; + }else if(value value&&this.left !=null){ + return this.left.searchParent(value); //向左子树递归查找 + }else if(this.value<=value&&this.right !=null){ + return this.right.searchParent(value); //向右子数递归查找 + }else { + return null; //没有找到父节点 + } + } + + } + + //递归的形式添加节点,满足二叉排序树的要求 + public void add(Node node){ + + if(node == null){ + return; + } + + //判断传入的节点的值和当前 + if(node.value(n); + numOfEdges = 0; + isVisited=new boolean[n]; + } + + /** + * 得到某一个邻接节点的第一个邻接节点的下标 + * @param index + * @return 如果找到返回下标编号,反之返回-1 + */ + public int getFirstNeighbor(int index){ + + for (int i = 0; i < vertexList.size(); i++) { + if(edges[index][i]>0){ + return i; + } + } + return -1; + } + + /** + * 根据前一个邻接节点的下标获取下一个邻接节点 + * @param preRowIndex 前一个邻接节点的行号 + * @param preColIndex 前一个邻接节点的列号 + * @return + */ + public int getNextNeighbor(int preRowIndex,int preColIndex){ + for (int j = preColIndex+1; j < vertexList.size(); j++) { + if(edges[preRowIndex][j]>0){ + return j; + } + } + return -1; + } + + + /** + * 深度优先遍历算法 + * @param isVisited 查询的是否被访问过的数组 + * @param i 要开始访问的节点 + */ + public void DFS(boolean[] isVisited,int i){ + + //首先访问该节点 + System.out.print(getValueByIndex(i)+"->"); + //将节点设置为已经访问过 + isVisited[i]=true; + + //访问第一个与之连接的节点 + int firstNeighbor = getFirstNeighbor(i); + while (firstNeighbor !=-1){ + if (!isVisited[firstNeighbor]) { + DFS(isVisited,firstNeighbor); + }else { + firstNeighbor=getNextNeighbor(i,firstNeighbor); + } + } + + } + + //对DFS进行重载遍历所有的节点,进行DFS(防止不连通图可能没有遍历到的问题) + public void DFS(){ + //遍历所有的节点,进行DFS + for (int i = 0; i < getNumOfVertex(); i++) { + if(!isVisited[i]){ + DFS(isVisited,i); + } + } + } + + //对一个节点进行广度优先遍历 + public void BFS(boolean[] isVisited,int i){ + + int u; //表示队列的头节点对应的下标 + int w; //表示邻接节点w + //队列,节点访问顺序记录 + LinkedList queue = new LinkedList<>(); + + //访问节点,输出节点信息 + System.out.print(getValueByIndex(i)+"=>"); + //标记为已访问 + isVisited[i]=true; + + //将节点加入队列 + queue.addLast(i); + + while (!queue.isEmpty()){ + + //取出队列的头节点下标 + u = queue.removeFirst(); + //得到第一个邻接节点的下标 + w=getFirstNeighbor(u); + while (w!= -1){ + //是否访问过 + if(!isVisited[w]){ + System.out.print(getValueByIndex(w)+"=>"); + //标记为已访问过 + isVisited[w]=true; + //入队 + queue.addLast(w); + }else { + //查找除w以外的第一个邻接节点的下标 + w = getNextNeighbor(u, w); //体现出广度优先 + + } + } + } + + } + + //重载,避免非连接图的情况 + public void BFS(){ + + for (int i = 0; i < getNumOfVertex(); i++) { + if(!isVisited[i]){ + BFS(isVisited,i); + } + } + } + + + /** + * 图中常用的方法: + * 1.得到节点个数 + * 2.得到变得数目 + * 3.返回节点i对应的数据 + * 4.显示图对应的矩阵 + */ + public int getNumOfVertex(){ + return vertexList.size(); + } + public int getNumOfEdges(){ + return numOfEdges; + } + public String getValueByIndex(int i){ + return vertexList.get(i); + } + public int getWeight(int v1,int v2){ + return edges[v1][v2]; + } + public void showGraph(){ + if(edges==null){ + System.out.println("当前图为空"); + } + for (int[] edge : edges) { + System.out.println(Arrays.toString(edge)); + } + } + + //插入节点 + public void insertVertex(String vertex){ + vertexList.add(vertex); + } + + + /** + * 添加边 + * @param v1 要添加边的两个顶点的下标 + * @param v2 + * @param weight 权 + */ + public void insertEdge(int v1,int v2,int weight){ + + edges[v1][v2]=weight; + edges[v2][v1]=weight; + numOfEdges++; + + } + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/hashtable/HashTableDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/hashtable/HashTableDemo.java new file mode 100644 index 0000000..27fce05 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/hashtable/HashTableDemo.java @@ -0,0 +1,238 @@ +package com.atguigu.hashtable; + +import java.util.Scanner; + +public class HashTableDemo { + + public static void main(String[] args) { + + //创建一个hashtable + HashTable hashTable = new HashTable(7); + //编写一个简单菜单 + Scanner scanner = new Scanner(System.in); + String key=""; + while (true){ + System.out.println("add:添加雇员"); + System.out.println("show:显示雇员"); + System.out.println("find:查找雇员"); + System.out.println("delete:删除雇员"); + System.out.println("exit:退出菜单"); + + key=scanner.next(); + switch (key){ + case "add": + System.out.println("输入id:"); + int id=scanner.nextInt(); + System.out.println("输入名字:"); + String name=scanner.next(); + //创建一个雇员 + Emp emp = new Emp(id, name); + hashTable.add(emp); + break; + case "show": + hashTable.showHashTable(); + break; + case "find": + System.out.println("输入要查找的员工id:"); + int ids =scanner.nextInt(); + hashTable.find(ids); + break; + case "delete": + System.out.println("输入要删除的员工id:"); + int nums =scanner.nextInt(); + hashTable.delete(nums); + break; + case "exit": + scanner.close(); + System.exit(0); + break; + } + } + + } + + + +} + +/** + * 雇员类,包含雇员的所有属性,比如id,name,address等 + */ +class Emp{ + public int id; + public String name; + public Emp next; //默认为空 + + public Emp(int id, String name) { + this.id = id; + this.name = name; + } + + @Override + public String toString() { + return "Emp{" + + "id=" + id + + ", name='" + name + '\'' + + '}'; + } +} +/** + * 创建一个链表,用户存放连续存放各个雇员 + */ +class EmpLinkedList{ + + //头指针,head直接指向第一个雇员 + private Emp head; //默认为null + + /** + * 添加雇员到链表中 + * 说明:添加雇员时,假定id是自增的,总是从小到大,直接加入到本链表的最后即可 + * @param emp + */ + public void add(Emp emp){ + //如果是添加第一条员工 + if(head==null){ + head=emp; + return; + } + //如果不是第一个员工,则使用一个辅助指针遍历循环到链表的结尾,再添加上去 + Emp temp=head; + while (temp.next!=null){ + temp=temp.next; + } + temp.next=emp; + } + public void showList(int i){ + //如果链表没有元素,则打印无元素 + if(head==null){ + System.out.printf("第%d链表中暂时没有元素\n",i); + return; + } + //如果有元素,则使用一个辅助变量遍历 + System.out.printf("第%d链表的信息为:\n",i); + Emp temp=head; + while (temp!=null){ + System.out.println(temp); + temp=temp.next; + } + } + + //根据id查找雇员 + public Emp find(int id){ + //如果链表为空直接返回null + if(head==null){ + System.out.println("当前链表为空,未查找到相关员工"); + return null; + } + //如果链表有员工则构造辅助变量进行查找 + Emp temp=head; + while (temp!=null){ + if(temp.id==id){ + return temp; + } + temp=temp.next; + } + System.out.println("未查找到相关员工"); + return null; + } + + //根据id删除员工 + public void delete(int id){ + //如果链表为空,则无需删除 + if(head==null){ + System.out.println("当前链表为空,没有该雇员"); + return; + } + if(head.next==null){ + if(head.id==id){ + head=null; + System.out.println("删除成功,当前链表为空"); + } + } + + //存在则构造辅助指针遍历找到该雇员,并删除 + Emp temp=head; + Boolean flag=false;//构造一个标志是否查找到该员工 + Boolean tou=false; + + while (temp!=null){ + if(temp.next==null){ + break; + } + if(temp.next.id==id){ + flag=true; + break; + } + + temp=temp.next; + } + if(flag){ + //找到了 + temp.next=temp.next.next; + System.out.println("找到该员工,并成功删除"); + }else { + System.out.println("链表中不存在该员工"); + } + } + +} + +/** + * 创建一个hashTable管理多条链表 + */ +class HashTable{ + private EmpLinkedList[] empLinkedListArray; + private int size; + + //创建一个构造器初始化链表大小 + public HashTable(int size) { + this.empLinkedListArray = new EmpLinkedList[size]; + this.size=size; + //初始化每一条链表,否则会报空指针异常 + for (int i = 0; i < size; i++) { + empLinkedListArray[i]=new EmpLinkedList(); + } + } + //编写一个散列函数 + public int hashFun(int id){ + return id%size; + } + + //添加雇员 + public void add(Emp emp){ + //根据员工的id,得到该员工应该添加到哪个链表 + int empLinkedListNo = hashFun(emp.id); + empLinkedListArray[empLinkedListNo].add(emp); + } + //遍历所有的链表,即遍历哈希表 + public void showHashTable(){ + for (int i = 0; i < empLinkedListArray.length; i++) { + empLinkedListArray[i].showList(i); + } + } + //根据id查找雇员 + public void find(int id){ + int num=hashFun(id); + System.out.println("去查找第"+num+"条链表"); + Emp emp = empLinkedListArray[num].find(id); + if(emp!=null){ + System.out.println(emp); + } + + } + //根据id删除员工 + public void delete(int id){ + int num=hashFun(id); + System.out.println("去第"+num+"条链表删除员工"); + empLinkedListArray[num].delete(id); + + } +} + + + + + + + + diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/huffmancode/HuffmanCode.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/huffmancode/HuffmanCode.java new file mode 100644 index 0000000..8a64410 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/huffmancode/HuffmanCode.java @@ -0,0 +1,453 @@ +package com.atguigu.huffmancode; + +import java.io.*; +import java.lang.reflect.Array; +import java.util.*; + +public class HuffmanCode { + + + public static void main(String[] args) { + +// String str = "i like like like java do you like a java"; +// byte[] bytes = str.getBytes(); +// System.out.println(bytes.length); //40 +// byte[] huffmanCodesBytes = huffmanZip(bytes); +// System.out.println("压缩后的结果:" + Arrays.toString(huffmanCodesBytes) + " 长度=" + huffmanCodesBytes.length); +// +// //解码 +// byte[] decode = decode(huffmanCodes, huffmanCodesBytes); +// System.out.println(new String(decode)); + + //测试压缩文件 +// String srcFile="D:\\背景和屏保\\code2.png"; +// String dstFile="D:\\背景和屏保\\dst.zip"; +// zipFile(srcFile,dstFile); +// System.out.println("压缩文件成功"); + + //测试解压文件 + String zipFile="D:\\背景和屏保\\dst.zip"; + String dstFile ="D:\\背景和屏保\\code3.png"; + unZipFile(zipFile,dstFile); + System.out.println("解压成功"); + + + + } + + /** + * 编写一个方法,完成对压缩文件的解压 + * @param zipFile 准备解压的文件 + * @param dstFile 解压后文件的路径 + */ + public static void unZipFile(String zipFile,String dstFile){ + + //定义文件的输入流 + InputStream inputStream=null; + //定义一个对象输入流 + ObjectInputStream objectInputStream=null; + //定义一个文件输出流 + OutputStream outputStream=null; + try { + //创建文件输入流 + inputStream = new FileInputStream(zipFile); + //创建一个和fileInputStream关联的对象输入流 + objectInputStream = new ObjectInputStream(inputStream); + //读取byte数组huffmanByte + byte[] huffmanBytes = (byte[])objectInputStream.readObject(); + Map huffmanCodes = (Map) objectInputStream.readObject(); + + //解码 + byte[] decode = decode(huffmanCodes, huffmanBytes); + + //将decode数组写入到目标文件 + outputStream=new FileOutputStream(dstFile); + //写输入到dstFile + outputStream.write(decode); + + }catch (Exception e){ + System.out.println(e.getMessage()); + + }finally { + + try { + outputStream.close(); + objectInputStream.close(); + inputStream.close(); + } catch (Exception e) { + System.out.println(e.getMessage());; + } + + + } + + } + + /** + * 编写方法,将一个文件进行压缩 + * @param srcFile 传入希望压缩的文件的全路径 + * @param dstFile 压缩后的压缩文件存放路径 + */ + public static void zipFile(String srcFile,String dstFile){ + + //创建输入流 + FileInputStream fileInputStream =null; + //创建输出流 + OutputStream outputStream=null; + ObjectOutputStream objectOutputStream=null; + + try { + //创建文件的输入流 + fileInputStream = new FileInputStream(srcFile); + //创建一个和源文件大小一样的byte[];.available()即返回源文件的大小 + byte[] b = new byte[fileInputStream.available()]; + //读取文件,存放在b字节数组里面 + fileInputStream.read(b); + + //对源文件进行压缩 + byte[] huffmanBytes = huffmanZip(b); + + //创建文件的输出流,存放压缩文件 + outputStream= new FileOutputStream(dstFile); + //创阿金一个核文件输出流关联的ObjectOutputStream + objectOutputStream = new ObjectOutputStream(outputStream); + //把赫夫曼编码后的字节数组写入压缩文件 + objectOutputStream.writeObject(huffmanBytes); + + //这里我们一对象流的方式写入赫夫曼编码,是为了以后我们恢复源文件时使用 + //注意一定要把赫夫曼编码写入压缩文件,否则无法回复 + objectOutputStream.writeObject(huffmanCodes); + + + } catch (Exception e) { + System.out.println(e.getMessage());; + }finally { + try { + objectOutputStream.close(); + outputStream.close(); + fileInputStream.close(); + } catch (Exception e) { + System.out.println(e.getMessage());; + } + + } + + + } + + /** + * 解码思路: + * 1.将huffmanCodeBytes [-88,-65,-56,.....]冲洗转成赫夫曼编码对应的二进制的字符串"1010100010111..." + *2.赫夫曼编码对应的二进制的字符串"1010100010111..."=>对照赫夫曼编码=>"i like like like java ..." + */ + + /** + * 编写一个方法,完成对压缩数据的解码 + * + * @param huffmanCodes 哈夫曼编码表 + * @param huffmanBytes 需要解码的数组 + * @return 原来字符串对应的数组 + */ + public static byte[] decode(Map huffmanCodes, byte[] huffmanBytes) { + + //1.先得到huffmanBytes对应的二进制的字符串,形式101010010111... + StringBuilder stringBuilder = new StringBuilder(); + //将byte数组转成二进制的字符串 + for (int i = 0; i < huffmanBytes.length; i++) { + //判断是否是最后一个字节 + boolean flag = (i == huffmanBytes.length - 1); + stringBuilder.append(byteToBitString(!flag, huffmanBytes[i])); + + } + //把字符串按照指定的赫夫曼编码进行解码 + //把赫夫曼编码表进行调换,因为反向查询a ->100 100 ->a + Map map = new HashMap(); + for (Map.Entry entry : huffmanCodes.entrySet()) { + map.put(entry.getValue(), entry.getKey()); + } + + //创建一个集合,byte + List list = new ArrayList<>(); + int begin=0; + for (int i = 1; i <= stringBuilder.length(); i++) { + String substring = stringBuilder.substring(begin, i); + if(map.containsKey(substring)){ + list.add(map.get(substring)); + begin=i; + } + } + + //把list中的数据存档在byte[]并返回 + byte[] b=new byte[list.size()]; + for (int i = 0; i < b.length; i++) { + b[i]=list.get(i); + } + return b; + + + } + + + /** + * 完成对数据的解压:将一个byte转成一个二进制的字符串 + * + * @param b + * @param flag 表示是否需要补高位,如果是true,表示需要补高位;如果是最后一个字节无需补高位 + * @return 是b对应的二进制的字符串(按补码返回) + */ + public static String byteToBitString(boolean flag, byte b) { + //使用变量保存b + int temp = b; //将b转成int + + if (flag) { + //如果是正数,需要补高位; + temp |= 256; //按位或 temp 0000 0001 | 1 0000 0000 =>1 0000 0001 + } + + String str = Integer.toBinaryString(temp); //返回的是temp对应的二进制的补码 + + if (flag) { + return str.substring(str.length() - 8); + } else { + return str; + } + + + } + + + /** + * 赫夫曼压缩 + * 将前面的方法封装起来,便于调用 + * + * @param bytes 原始的字符串对应的字节数组 + * @return 经过赫夫曼编码处理后的字节数组 + */ + public static byte[] huffmanZip(byte[] bytes) { + + + //根据字节数组创建节点 + List nodes = getNodes(bytes); + + //根据nodes创建的赫夫曼树 + Node root = createHuffmanTree(nodes); + + //根据赫夫曼树生成了对应的赫夫曼编码 + Map huffmanCodes = getCodes(root); + + //根据赫夫曼编码对原始数据进行压缩 + byte[] zip = zip(bytes, huffmanCodes); + + return zip; + + } + + + /** + * 编写一个方法,将字符串对象的byte[]数组,通过生成的赫夫曼编码表,返回一个编码表压缩后的byte[] + * + * @param bytes 袁术的字符串对应的byte[] + * @param huffmanCodes 生成的赫夫曼编码的map + * @return 返回赫夫曼编码压缩后的byte[] =>即编码后的字节(补码) -> x-1(反码) ->除符号位以外取反(源码)在存在字节数组 + */ + public static byte[] zip(byte[] bytes, Map huffmanCodes) { + + //1.利用huffmanCodes将bytes转成赫夫曼编码对应的字符串 + StringBuilder stringBuilder = new StringBuilder(); + //遍历bytes数组 + for (byte b : bytes) { + stringBuilder.append(huffmanCodes.get(b)); + } + + //将1010100010111111110...转成byte[] + + //统计返回byte[] huffmanCodeBytes长度 + int len; + if (stringBuilder.length() % 8 == 0) { + len = stringBuilder.length() / 8; + } else { + len = stringBuilder.length() / 8 + 1; + } + + //创建存储压缩后的byte数组 + byte[] huffmanCodeBytes = new byte[len]; + int index = 0;//记录是第几个Byte + for (int i = 0; i < stringBuilder.length(); i += 8) { + //每8位构成一个字符 + String strByte; + if (i + 8 > stringBuilder.length()) { + strByte = stringBuilder.substring(i); + } else { + strByte = stringBuilder.substring(i, i + 8); + } + //将strByte转成一个byte,放入到huffmanCodeBytes + huffmanCodeBytes[index++] = (byte) Integer.parseInt(strByte, 2); + } + return huffmanCodeBytes; + + } + + //生成赫夫曼树对应的赫夫曼编码 + //思路: + //1.将赫夫曼编码表存放在Map形式 + // 32->01 97->100 100->11000等等 + static Map huffmanCodes = new HashMap(); + //2.在生成赫夫曼编码表时,需要去凭借路径,定义一个StringBuilder存储某个叶子结点的路径 + static StringBuilder stringBuilder = new StringBuilder(); + + //为了调用方便,重载getCodes + public static Map getCodes(Node root) { + if (root == null) { + return null; + } + //处理root的左子树 + getCodes(root.left, "0", stringBuilder); + getCodes(root.right, "1", stringBuilder); + return huffmanCodes; + } + + /** + * 将传入node节点的左右叶子结点的赫夫曼编码得到,并放入到huffmanCodes集合 + * + * @param node 传入的节点 + * @param code 路径:左子节点是0,右子节点是1 + * @param stringBuilder 用于拼接路径 + */ + public static void getCodes(Node node, String code, StringBuilder stringBuilder) { + StringBuilder stringBuilder1 = new StringBuilder(stringBuilder); + //将code加入到StringBuild1 + stringBuilder1.append(code); + if (node != null) { + //判断当前node是叶子结点还是非叶子节点 + if (node.data == null) { + //向左递归递归 + getCodes(node.left, "0", stringBuilder1); + //向右递归 + getCodes(node.right, "1", stringBuilder1); + } else { + //说明是一个叶子结点,就表示找到某个叶子结点的最后 + huffmanCodes.put(node.data, stringBuilder1.toString()); + } + } + + } + + + //前序遍历 + public static void preOrder(Node root) { + + if (root == null) { + System.out.println("当前树为空,无法遍历"); + } else { + root.preOrder(); + } + + } + + public static Node createHuffmanTree(List nodes) { + + while (nodes.size() > 1) { + + //从小到大排序 + Collections.sort(nodes); + + //取出第一课最小的二叉树 + Node left = nodes.get(0); + Node right = nodes.get(1); + + //创建一颗新的二叉树,他的根节点没有data,只有权值 + Node parent = new Node(null, left.weight + right.weight); + parent.left = left; + parent.right = right; + + //将已经处理的两个二叉树从nodes删除 + nodes.remove(left); + nodes.remove(right); + //将新的二叉树加入到nodes + nodes.add(parent); + + } + return nodes.get(0); + + + } + + /** + * 创建list + * + * @param bytes 接受的字节数组 + * @return List[ Node[date=97,weight=5] ,Node[date=32,weight=3],...] + */ + public static List getNodes(byte[] bytes) { + + //创建一个ArrayList + ArrayList nodes = new ArrayList(); + + //存储每一个byte出现的次数 + //遍历bytes,统计每一个byte出现的次数 ->map[key,value] + Map counts = new HashMap<>(); + for (byte b : bytes) { + Integer count = counts.get(b); + if (count == null) { + counts.put(b, 1); + } else { + counts.put(b, count + 1); + } + } + + //把每一个键值对转成一个Node对象,并加入到nodes集合 + for (Map.Entry entry : counts.entrySet()) { + nodes.add(new Node(entry.getKey(), entry.getValue())); + } + + + return nodes; + + } + + +} + +//创建Node,带数据和权值 +class Node implements Comparable { + + Byte data; //存放时数据本身,比如'a' =>97 ' ' =>32 + int weight; //权值,表示字符出现的次数 + Node left; + Node right; + + public Node(Byte data, int weight) { + this.data = data; + this.weight = weight; + } + + + @Override + public int compareTo(Node o) { + //从小到大排序 + return this.weight - o.weight; + } + + @Override + public String toString() { + return "Node{" + + "data=" + data + + ", weight=" + weight + + '}'; + } + + //前序遍历 + public void preOrder() { + + System.out.println(this); + if (this.left != null) { + this.left.preOrder(); + } + if (this.right != null) { + this.right.preOrder(); + } + + + } + +} \ No newline at end of file diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/huffmantree/HuffmanTree.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/huffmantree/HuffmanTree.java new file mode 100644 index 0000000..7a56aa3 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/huffmantree/HuffmanTree.java @@ -0,0 +1,108 @@ +package com.atguigu.huffmantree; + +import java.util.ArrayList; +import java.util.Collections; + +public class HuffmanTree { + + + public static void main(String[] args) { + + int arr[] ={13,7,8,3,29,6,1}; + Node root = createHuffmanTree(arr); + preOrder(root); + + } + + //编写一个前序遍历的方法 + public static void preOrder(Node root){ + if(root !=null){ + root.preOrder(); + }else { + System.out.println("当前树为空,无法遍历"); + } + + } + + + /** + * 创建赫夫曼树的方法 + * @param arr 需要变为赫夫曼树的数组 + * @return 赫夫曼树的根节点 + */ + public static Node createHuffmanTree(int[] arr){ + + //(1)为了操作方便,将元素放进ArrayList + ArrayList nodes = new ArrayList<>(); + for (int value : arr) { + nodes.add(new Node(value)); + } + + //处理过程是一个循环过程 + while(nodes.size()>1){ + //从小到大排序 + Collections.sort(nodes); + + + //取出根节点权值最小的两颗二叉树 + Node left=nodes.get(0); + Node right=nodes.get(1); + + //构建一颗新的二叉树 + Node parent =new Node(left.value+right.value); + parent.left=left; + parent.right=right; + + //从ArrayList中删除处理过的二叉树 + nodes.remove(left); + nodes.remove(right); + + //将parent将入到node + nodes.add(parent); + } + + //返回赫夫曼树的root节点 + return nodes.get(0); + + } + +} + +//创建节点类,实现Comparable接口 +class Node implements Comparable{ + + int value; //节点权值 + Node left; //指向左子节点 + Node right; //指向右子节点 + + //前序遍历 + public void preOrder(){ + + System.out.println(this); + if(this.left !=null){ + this.left.preOrder(); + } + if(this.right !=null){ + this.right.preOrder(); + } + + } + + + public Node(int value) { + this.value = value; + } + + @Override + public String toString() { + return "Node{" + + "value=" + value + + '}'; + } + + + @Override + public int compareTo(Node o) { + return this.value-o.value; + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/DoubleLinkedListDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/DoubleLinkedListDemo.java new file mode 100644 index 0000000..d82c6b0 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/DoubleLinkedListDemo.java @@ -0,0 +1,240 @@ +package com.atguigu.linkedlist; + + +import com.sun.org.apache.xpath.internal.operations.Bool; +import sun.text.SupplementaryCharacterData; + +import javax.swing.text.StyledEditorKit; + +/** + * 双向链表的增删改查 + */ +public class DoubleLinkedListDemo { + + + public static void main(String[] args) { + + //测试 + System.out.println("双向链表的测试"); + //创建节点 + HeroNode hero1 = new HeroNode(1, "宋江", "及时雨"); + HeroNode hero2 = new HeroNode(2, "卢俊义", "玉麒麟"); + HeroNode hero3 = new HeroNode(3, "吴用", "智多星"); + HeroNode hero4 = new HeroNode(4, "林冲", "豹子头"); + + //创建链表 + DoubleLinkedList doubleLinkedList =new DoubleLinkedList(); + doubleLinkedList.addByOrder(hero4); + doubleLinkedList.addByOrder(hero2); + doubleLinkedList.addByOrder(hero1); + doubleLinkedList.addByOrder(hero3); + + //显示 + doubleLinkedList.showDoubleLinkedList(); + + //修改 + HeroNode newHeroNode = new HeroNode(4, "公孙胜", "入云龙"); + doubleLinkedList.update(newHeroNode); + System.out.println("修改后的链表"); + doubleLinkedList.showDoubleLinkedList(); + + //删除 + doubleLinkedList.delete(3); + System.out.println("删除后的链表情况:"); + doubleLinkedList.showDoubleLinkedList(); + + + + + + } + + public static class DoubleLinkedList{ + + //先初始化一个头结点,头结点不要动,不存放具体的数据 + private static HeroNode head =new HeroNode(0,"",""); + + //遍历双向链表的方法 + public static void showDoubleLinkedList(){ + + if(head == null){ + System.out.println("链表为空"); + return; + } + //构造一个辅助变量用于遍历 + HeroNode temp =head.next; + + while(true){ + + //判断是否到达了最后 + if(temp ==null){ + break; + } + System.out.println(temp); + temp =temp.next; + } + } + + + //加一个数据添加到双向链表的末尾 + public static void add(HeroNode data){ + + HeroNode temp =head; + while (true){ + if(temp.next ==null){ + break; + } + temp=temp.next; + } + //形成一个双向链表 + temp.next=data; + data.pre=temp; + } + + + //按照编号顺序来添加 + public static void addByOrder(HeroNode data){ + + HeroNode temp =head; + Boolean flag =false; + + while(true){ + + if(temp.next==null){ + break; + } + if(temp.next.no>data.no){ + + break; + } + if(temp.no == data.no){ + System.out.println("编号和节点重复,无法加入"); + flag =true; + return; + } + temp=temp.next; + } + if(!flag){ + if(temp.next!=null){ + temp.next.pre=data; + data.next=temp.next; + } + data.pre=temp; + temp.next=data; + } + + + + } + + + //对双向链表的相同编号数据进行修改 + public static void update(HeroNode data){ + + if(head.next == null){ + System.out.println("链表为空"); + return; + } + + HeroNode temp =head.next; + Boolean flag =false; + + while (true){ + + if(temp ==null){ + System.out.printf("未查找到相同编号%d的节点,无法修改\n",data.no); + break; + } + if(temp.no==data.no){ + flag =true; + break; + } + temp=temp.next; + } + + if(flag){ + System.out.println("找到了"); + temp.nickname=data.nickname; + temp.name =data.name; + } + + } + + + //从双向链表中删除一个节点 + public static void delete(int no){ + + if(head.next == null){ + System.out.println("链表为空,无法删除"); + return; + } + + boolean flag =false; + HeroNode temp =head; + + while (true){ + + if(head.next == null){ + System.out.printf("未找到编号为%d的节点\n",no); + } + if(temp.no == no){ + flag =true; + break; + } + temp =temp.next; + } + if(flag){ + temp.pre.next=temp.next; + //如果是最后一个节点,就不需要执行否则会出现空指针异常 + if(temp.next !=null){ + temp.next.pre = temp.pre; + } + } + + + } + + + + } + + + /** + * 创建一个双向链表的类 + */ + public static class HeroNode{ + private int no; + private String name; + private String nickname; + private HeroNode next; //指向下一个节点,默认为null + private HeroNode pre; //指向前一个节点,默认为null + + public HeroNode() { + } + + public HeroNode(int no, String name, String nickname, HeroNode next, HeroNode pre) { + this.no = no; + this.name = name; + this.nickname = nickname; + this.next = next; + this.pre = pre; + } + + public HeroNode(int no, String name, String nickname) { + this.no = no; + this.name = name; + this.nickname = nickname; + } + + @Override + public String toString() { + return "HeroNode{" + + "no=" + no + + ", name='" + name + '\'' + + ", nickname='" + nickname + '\'' + + '}'; + } + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/Josephu.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/Josephu.java new file mode 100644 index 0000000..13de2e9 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/Josephu.java @@ -0,0 +1,174 @@ +package com.atguigu.linkedlist; + +public class Josephu { + + + public static void main(String[] args) { + + //测试构建环形链表和遍历 + CircleSingleLinkedList circleSingleLinkedList = new CircleSingleLinkedList(); + + circleSingleLinkedList.addBoy(125); //加入五个小孩节点 + circleSingleLinkedList.showBoys(); + + //测试小孩出圈是否正确 + circleSingleLinkedList.countBoy(10,20,125); + + + } + + + //创建一个环形的单向链表 + public static class CircleSingleLinkedList { + + //创建一个first节点,当前没有编号 + private static Boy first = new Boy(-1); + + //添加小孩节点,构建成一个环形的链表 + public static void addBoy(int nums) { + + //num做一个数据校验 + if (nums < 2) { + System.out.println("nums的值不正确"); + return; + } + //创建辅助变量,帮助构建环形链表 + Boy curBoy = null; + + //使用for来创建环形链表 + for (int i = 1; i <= nums; i++) { + //根据编号,创建小孩节点 + Boy boy=new Boy(i); + //如果是第一个小孩 + if(i == 1){ + first=boy; + first.setNext(first); //自己构成一个环 + curBoy=first; + }else { + curBoy.setNext(boy); + boy.setNext(first); + curBoy=boy; + } + } + + } + + //遍历环形链表 + public static void showBoys(){ + + //判断链表是否为空 + if(first == null){ + System.out.println("没有任何小孩"); + return; + } + //构造一个辅助指针完成遍历 + Boy curBoy =first; + + while(true){ + System.out.printf("小孩的编号%d\n",curBoy.getNo()); + if(curBoy.getNext() == first){ + //遍历完毕 + break; + } + curBoy=curBoy.getNext(); + } + } + + + /** + * 根据用户的输入,计算小孩出圈的顺序 + * @param startNo 表示从第几个小孩开始输数数 + * @param countNum 表示数几下 + * @param nums 表示最开始有多少小孩在圈里 + */ + public static void countBoy(int startNo,int countNum,int nums){ + + //先对数据进行检验 + if(first ==null ||startNo <1 ||startNo>nums){ + System.out.println("参数输入有误,请重新输入"); + return; + } + + //创建一个辅助指针,帮助完成小孩出圈 + Boy helper =first; + + //通过循环让其事先指向环形链表的最后这个节点 + while(true){ + if(helper.getNext() ==first){ + //helper指向了最后的小孩节点 + break; + } + helper =helper.getNext(); + } + + //从第k个小孩开始报数,先让first和helper移动k-1次 + for (int i = 0; i < startNo - 1; i++) { + first=first.getNext(); + helper=helper.getNext(); + } + + //当小孩报数时,first和helper指针同时移动m-1次,然后出圈 + //直到圈中只有一个节点 + while(true){ + if(helper ==first){ + + //圈中只有一个节点 + break; + } + //first和helper指针同时移动m-1次,然后出圈 + for (int i = 0; i < countNum - 1; i++) { + first=first.getNext(); + helper=helper.getNext(); + } + //这时first指向的节点,就是要出圈的小孩节点 + System.out.printf("小孩%d出圈\n",first.getNo()); + //这时将first指向的小孩节点出圈 + first=first.getNext(); + helper.setNext(first); + + + } + System.out.printf("最后留在圈中的小孩编号%d\n",first.getNo()); + + } + } + + //创建一个Boy类,表示一个节点 + public static class Boy { + + private int no; //编号 + private Boy next; //指向下一个节点,默认null + + public Boy(int no) { + this.no = no; + } + + public Boy(int no, Boy next) { + this.no = no; + this.next = next; + } + + public int getNo() { + return no; + } + + public void setNo(int no) { + this.no = no; + } + + public Boy getNext() { + return next; + } + + public void setNext(Boy next) { + this.next = next; + } + + @Override + public String toString() { + return "Boy{" + + "no=" + no + + '}'; + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/SingleLinkedListApplication.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/SingleLinkedListApplication.java new file mode 100644 index 0000000..0cb7422 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/SingleLinkedListApplication.java @@ -0,0 +1,466 @@ +package com.atguigu.linkedlist; + +import com.sun.corba.se.impl.resolver.SplitLocalResolverImpl; + +import java.awt.*; +import java.util.Stack; + +public class SingleLinkedListApplication { + + public static void main(String[] args) { + + //进行测试 + //先创建节点 + HeroNode hero1 = new HeroNode(1, "宋江", "及时雨"); + HeroNode hero2 = new HeroNode(2, "卢俊义", "玉麒麟"); + HeroNode hero3 = new HeroNode(3, "吴用", "智多星"); + HeroNode hero4 = new HeroNode(4, "林冲", "豹子头"); + + HeroNode hero5 = new HeroNode(5, "宋江", "及时雨"); + HeroNode hero6 = new HeroNode(6, "卢俊义", "玉麒麟"); + HeroNode hero7 = new HeroNode(7, "吴用", "智多星"); + HeroNode hero8 = new HeroNode(8, "林冲", "豹子头"); + + //创建一个链表 + SingleLinkedList singleLinkedList = new SingleLinkedList(); + SingleLinkedList singleLinkedList1 =new SingleLinkedList(); + + //加入 + singleLinkedList.addByOrder(hero2); + singleLinkedList.addByOrder(hero5); + singleLinkedList.addByOrder(hero1); + singleLinkedList.addByOrder(hero6); + + singleLinkedList1.addByOrder(hero4); + singleLinkedList1.addByOrder(hero3); + singleLinkedList1.addByOrder(hero8); + singleLinkedList1.addByOrder(hero7); + +// //测试单链表的反转 +// System.out.println("原来的链表:"); +// singleLinkedList.showLinkedList(); +// +// System.out.println("反转单链表:"); +// reverseList(singleLinkedList.head); +// singleLinkedList.showLinkedList(); +// +// //逆序打印单链表 +// System.out.println("逆序打印单链表,没有改变单链表的结构:"); +// reversePrint(singleLinkedList.head); + + //两有序链表的合并 + HeroNode combine = combine1(singleLinkedList1.head, singleLinkedList.head); + + + +// +// //显示 +// singleLinkedList.showLinkedList(); +// +// //测试修改节点的代码 +// HeroNode newHeroNode = new HeroNode(2, "小卢", "玉麒麟~~"); +// singleLinkedList.update(newHeroNode); +// +// //修改后的链表 +// System.out.println("修改后的链表情况:"); +// singleLinkedList.showLinkedList(); +// +// //测试删除 +// System.out.println("删除后的链表情况:"); +// singleLinkedList.delete(1); +// singleLinkedList.delete(4); +// singleLinkedList.showLinkedList(); +// +// //测试单链表汇总有效节点的个数 +// System.out.println("有效节点的个数:" + getLength(singleLinkedList.head)); +// +// //测试是否能得到倒数第k的节点 +// HeroNode res =findLastIndexNode(singleLinkedList.head,2); +// System.out.println("res="+res); + + } + + /** + * 合并两个有序单链表 + */ + public static HeroNode combine1(HeroNode head1,HeroNode head2){ + + if(head1.next == null && head2.next ==null){ + System.out.println("两链表为空,无法合并"); + return null; + }else if(head1.next == null) { + return head2; + }else if(head2.next == null){ + return head1; + } + + HeroNode temp1 =head1.next; + HeroNode temp2 =head2.next; + HeroNode next =null; + SingleLinkedList combiner =new SingleLinkedList(); + HeroNode combiner1 =combiner.head; + + while(temp1 !=null &&temp2 !=null){ + + if(temp1.no >=temp2.no){ + next =temp2.next; + //temp2 =combiner.next; + combiner1.next =temp2; + temp2=next; + combiner1=combiner1.next; + }else { + next =temp1.next; + //temp1 =combiner.next; + combiner1.next =temp1; + temp1=next; + combiner1=combiner1.next; + } + + + } + while(temp1 ==null){ + if(temp2 !=null){ + next =temp2.next; + combiner1.next=temp2; + temp2 =next; + combiner1=combiner1.next; + }else { + break; + } + } + while(temp2 ==null){ + if(temp1 !=null){ + next =temp1.next; + combiner1.next=temp1; + temp1 =next; + combiner1=combiner1.next; + }else { + break; + } + } + System.out.println("合并后的链表为:"); + combiner.showLinkedList(); + return combiner.head; + + } + + + + /** + * 使用方式2栈逆序打印单向链表 + * + */ + public static void reversePrint(HeroNode head){ + if(head.next ==null){ + return; + } + + + //创建一个栈,将各个节点压入栈 + Stack stack = new Stack(); + HeroNode temp =head.next; + //将链表的所有节点压入站中 + while(temp != null){ + stack.push(temp); + temp=temp.next; //temp后移 + } + //将占中的节点进行打印,pop出栈 + while(stack.size()>0){ + System.out.println(stack.pop()); //stack的特点是先进后出 + } + + + } + + /** + * 将链表反转 + * @param head + */ + public static void reverseList(HeroNode head){ + + if(head.next ==null ||head.next.next ==null){ + return; + } + + //定义一个辅助变量,遍历原来的链表 + HeroNode temp=head.next; + //定义指向当前节点的下一个 + HeroNode next =null; + //定义一个反转头 + HeroNode reverseHead = new HeroNode(); + //遍历原来的链表,每遍历一个节点就将其取出,并放在新的链表reverseHead的最前端 + + while(temp != null){ + next=temp.next; //先暂存当前节点的下一个节点,后面使用 + temp.next=reverseHead.next; //将temp的下一个节点指向新的链表的最前端 + reverseHead.next=temp; //将temp连接到新的链表上 + temp=next; //让temp后移 + } + + + + //将head.next指向reverseHead.next,实现单链表的反转 + head.next =reverseHead.next; + + + + + + } + + /** + * 查找单链表中的倒数第k个节点 + * 思路: + * 1.编写一个方法,接受head节点,同时接受一个index + * 2.index表示是倒数第index个节点 + * 3.先把链表从头到尾遍历,得到链表的总长度getLength + * 4.得到size后,从链表的第一个开始遍历(size-index)个,就可以得到 + * 5.如果找到了,则返回该节点,否则返回null + */ + public static HeroNode findLastIndexNode(HeroNode head, int index) { + + //如果链表为空,返回null + if (head.next == null) { + return null; + } + + //第一次遍历得到链表的长度(节点个数) + int size = getLength(head); + //第二次遍历xize-index位置,就是我们倒数第k个节点 + //先做一个index的校验 + if (index <= 0 || index > size) { + return null; + } + + HeroNode temp = head.next; + for (int i = 0; i < size - index;i++){ + temp=temp.next; + } + return temp; + + + } + + + /** + * 方法:获取到单链表的节点的个数(如果是带头节点的链表,需求不统计头节点) + * + * @param head 链表的头节点 + * @return 有效头节点的个数 + */ + public static int getLength(HeroNode head) { + + if (head.next == null) { + return 0; + } + HeroNode temp = head.next; //没有统计头节点 + int count = 0; + while (true) { + if (temp == null) { + break; + } + count++; + temp = temp.next; + + } + return count; + } + + //定义一个SingleLinkedList管理我们的英雄 + public static class SingleLinkedList { + //先初始化一个头节点,头节点不动,不存放具体的数据 + private HeroNode head = new HeroNode(0, "", ""); + + + /** + * 添加节点到单向链表 + * 思路:当不考虑编号顺序时 + * 1.找到当前链表的最后节点 + * 2.将最后这个节点的next指向新的节点 + * + * @param data + */ + public void add(HeroNode data) { + + //因为head节点不能懂,因此需要一个辅助变量temp + HeroNode temp = head; + //遍历链表,找到最后 + + while (true) { + //找到链表的最后 + if (temp.next == null) { + break; + } + //如果没有找到,就将其后移 + temp = temp.next; + } + //当退出循环,就指向了最后 + //将最后这个节点的next指向新的节点 + temp.next = data; + } + + /** + * 按顺序添加节点 + * 如果这个排名已存在,则报出添加失败 + */ + public void addByOrder(HeroNode data) { + + //通过辅助变量老帮助找到添加位置 + HeroNode temp = head; + boolean flag = false; //flag表示添加的编号是否存在,默认为false + + while (true) { + + if (temp.next == null) { + break; + } + if (temp.next.no > data.no) { + //位置找到了 + break; + } else if (temp.next.no == data.no) { + //编号已存在 + flag = true; + break; + } + temp = temp.next; + } + //判断flag的值 + if (flag) { + System.out.printf("准备插入的英雄的编号%d已经存在,不能加入\n", data.no); + } else { + //插入到temp的后面 + data.next = temp.next; + temp.next = data; + } + } + + /** + * 修改节点的信息,根据编号来修改,即no编号不能修改 + * 说明: + * 1.根据newHeroNode的no来修改即可 + * + * @param newHeroNode + */ + public void update(HeroNode newHeroNode) { + //判断是否为空 + if (head.next == null) { + System.out.println("链表为空"); + return; + } + //找到需要修改的节点,根据no编号 + //定义一个辅助变量 + HeroNode temp = head.next; + boolean flag = false; //表示是否找到了该节点 + while (true) { + if (temp == null) { + break; //链表已经遍历完 + } + if (temp.no == newHeroNode.no) { + //找到了 + flag = true; + break; + } + temp = temp.next; + } + //根据flag判断是否找到要修改的节点 + if (flag = true) { + System.out.println("找到要修改的节点,并修改"); + temp.name = newHeroNode.name; + temp.nickname = newHeroNode.nickname; + } else { + System.out.printf("没有找到编号%d的节点,不能修改\n", newHeroNode.no); + } + } + + /** + * 根据编号删除节点 + */ + public void delete(int no) { + + boolean flag = false; + + if (head.next == null) { + System.out.println("链表为空"); + } + + HeroNode temp = head; + while (true) { + if (temp.next == null) { + break; + } + if (temp.next.no == no) { + System.out.println("找到了"); + flag = true; + break; + } + temp = temp.next; + } + if (flag) { + temp.next = temp.next.next; + } else { + System.out.println("链表中不存在该编号"); + } + + + } + + /** + * 显示链表 + */ + public void showLinkedList() { + //判断链表是否为空 + if (head.next == null) { + System.out.println("链表为空"); + return; + } + //遍历 + HeroNode temp = head.next; + while (true) { + //判断是否到链表的结尾 + if (temp == null) { + break; + } + //输出节点信息 + System.out.println(temp); + temp = temp.next; + } + } + + } + + //定义HeroNode,每个HeroNode对象就是一个节点 + public static class HeroNode { + + private int no; + private String name; + public String nickname; + private HeroNode next; + + public HeroNode() { + } + + public HeroNode(int no, String name, String nickname) { + this.no = no; + this.name = name; + this.nickname = nickname; + } + + public HeroNode(int no, String name, String nickname, HeroNode next) { + this.no = no; + this.name = name; + this.nickname = nickname; + this.next = next; + } + + @Override + public String toString() { + return "HeroNode{" + + "no=" + no + + ", name='" + name + '\'' + + ", nickname='" + nickname + '\'' + + '}'; + } + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/SingleLinkedListDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/SingleLinkedListDemo.java new file mode 100644 index 0000000..de205bf --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/SingleLinkedListDemo.java @@ -0,0 +1,240 @@ +package com.atguigu.linkedlist; + +public class SingleLinkedListDemo { + + public static void main(String[] args) { + + //进行测试 + //先创建节点 + HeroNode hero1 = new HeroNode(1, "宋江", "及时雨"); + HeroNode hero2 = new HeroNode(2, "卢俊义", "玉麒麟"); + HeroNode hero3 = new HeroNode(3, "吴用", "智多星"); + HeroNode hero4 = new HeroNode(4, "林冲", "豹子头"); + + //创建一个链表 + SingleLinkedList singleLinkedList = new SingleLinkedList(); + //加入 + singleLinkedList.addByOrder(hero1); + singleLinkedList.addByOrder(hero4); + singleLinkedList.addByOrder(hero2); + singleLinkedList.addByOrder(hero3); + + //显示 + singleLinkedList.showLinkedList(); + + //测试修改节点的代码 + HeroNode newHeroNode = new HeroNode(2, "小卢", "玉麒麟~~"); + singleLinkedList.update(newHeroNode); + + //修改后的链表 + System.out.println("修改后的链表情况:"); + singleLinkedList.showLinkedList(); + + //测试删除 + System.out.println("删除后的链表情况:"); + singleLinkedList.delete(1); + singleLinkedList.delete(4); + singleLinkedList.delete(2); + singleLinkedList.delete(3); + singleLinkedList.showLinkedList(); + + } + + //定义一个SingleLinkedList管理我们的英雄 + public static class SingleLinkedList { + //先初始化一个头节点,头节点不动,不存放具体的数据 + private HeroNode head = new HeroNode(0, "", ""); + + + /** + * 添加节点到单向链表 + * 思路:当不考虑编号顺序时 + * 1.找到当前链表的最后节点 + * 2.将最后这个节点的next指向新的节点 + * + * @param data + */ + public void add(HeroNode data) { + + //因为head节点不能懂,因此需要一个辅助变量temp + HeroNode temp = head; + //遍历链表,找到最后 + + while (true) { + //找到链表的最后 + if (temp.next == null) { + break; + } + //如果没有找到,就将其后移 + temp = temp.next; + } + //当退出循环,就指向了最后 + //将最后这个节点的next指向新的节点 + temp.next = data; + } + + /** + * 按顺序添加节点 + * 如果这个排名已存在,则报出添加失败 + */ + public void addByOrder(HeroNode data) { + + //通过辅助变量老帮助找到添加位置 + HeroNode temp = head; + boolean flag = false; //flag表示添加的编号是否存在,默认为false + + while (true) { + + if (temp.next == null) { + break; + } + if (temp.next.no > data.no) { + //位置找到了 + break; + } else if (temp.next.no == data.no) { + //编号已存在 + flag = true; + break; + } + temp = temp.next; + } + //判断flag的值 + if (flag) { + System.out.printf("准备插入的英雄的编号%d已经存在,不能加入\n", data.no); + } else { + //插入到temp的后面 + data.next = temp.next; + temp.next = data; + } + } + + /** + * 修改节点的信息,根据编号来修改,即no编号不能修改 + * 说明: + * 1.根据newHeroNode的no来修改即可 + * + * @param newHeroNode + */ + public void update(HeroNode newHeroNode) { + //判断是否为空 + if (head.next == null) { + System.out.println("链表为空"); + return; + } + //找到需要修改的节点,根据no编号 + //定义一个辅助变量 + HeroNode temp = head.next; + boolean flag = false; //表示是否找到了该节点 + while (true) { + if (temp == null) { + break; //链表已经遍历完 + } + if (temp.no == newHeroNode.no) { + //找到了 + flag = true; + break; + } + temp = temp.next; + } + //根据flag判断是否找到要修改的节点 + if (flag = true) { + System.out.println("找到要修改的节点,并修改"); + temp.name = newHeroNode.name; + temp.nickname = newHeroNode.nickname; + } else { + System.out.printf("没有找到编号%d的节点,不能修改\n", newHeroNode.no); + } + } + + /** + * 根据编号删除节点 + */ + public void delete(int no) { + + boolean flag = false; + + if (head.next == null) { + System.out.println("链表为空"); + } + + HeroNode temp = head; + while (true) { + if (temp.next == null) { + break; + } + if (temp.next.no == no) { + System.out.println("找到了"); + flag = true; + break; + } + temp = temp.next; + } + if (flag) { + temp.next = temp.next.next; + } else { + System.out.println("链表中不存在该编号"); + } + + + } + + /** + * 显示链表 + */ + public void showLinkedList() { + //判断链表是否为空 + if (head.next == null) { + System.out.println("链表为空"); + return; + } + //遍历 + HeroNode temp = head.next; + while (true) { + //判断是否到链表的结尾 + if (temp == null) { + break; + } + //输出节点信息 + System.out.println(temp); + temp = temp.next; + } + } + + } + + //定义HeroNode,每个HeroNode对象就是一个节点 + public static class HeroNode { + + private int no; + private String name; + public String nickname; + private HeroNode next; + + public HeroNode() { + } + + public HeroNode(int no, String name, String nickname) { + this.no = no; + this.name = name; + this.nickname = nickname; + } + + public HeroNode(int no, String name, String nickname, HeroNode next) { + this.no = no; + this.name = name; + this.nickname = nickname; + this.next = next; + } + + @Override + public String toString() { + return "HeroNode{" + + "no=" + no + + ", name='" + name + '\'' + + ", nickname='" + nickname + '\'' + + '}'; + } + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/TestStack.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/TestStack.java new file mode 100644 index 0000000..7f3171d --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/linkedlist/TestStack.java @@ -0,0 +1,26 @@ +package com.atguigu.linkedlist; + + +import java.util.Stack; + +/** + * 演示栈的基本使用 + */ +public class TestStack { + + + public static void main(String[] args) { + + Stack stack = new Stack(); + //入栈 + stack.add("jack"); + stack.add("Tom"); + stack.add("smith"); + + //出栈 + while(stack.size()>0){ + System.out.println(stack.pop());//pop将栈顶的数据取出 + //smith Tom jack + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/queue/ArrayQueueDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/queue/ArrayQueueDemo.java new file mode 100644 index 0000000..3cd93fa --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/queue/ArrayQueueDemo.java @@ -0,0 +1,142 @@ +package com.atguigu.queue; + +import java.util.Scanner; + +public class ArrayQueueDemo { + + public static void main(String[] args) { + + //测试 + //创建一个队列 + ArrayQueue arrayQueue = new ArrayQueue(3); + char key = ' '; //接受用户输入 + Scanner scanner = new Scanner(System.in); + boolean loop = true; + //输出一个菜单 + while(loop){ + System.out.println("s(show):显示队列"); + System.out.println("e(exit):退出程序"); + System.out.println("a(add):添加数据到队列"); + System.out.println("g(get):从队列取出数据"); + System.out.println("h(head):查看队列头的数据"); + key = scanner.next().charAt(0); //接受一个字符; + switch (key){ + + case 's': + arrayQueue.showQueue(); + break; + case 'a': + System.out.println("请输出一个数:"); + int num = scanner.nextInt(); + arrayQueue.addQueue(num); + break; + case 'g': + try{ + int res = arrayQueue.getQueue(); + System.out.printf("取出的数据是%d\n",res); + + }catch (Exception e){ + System.out.println(e.getMessage()); + } + break; + case 'h': + //查看队列头的数据 + try{ + int res = arrayQueue.headQueue(); + System.out.printf("队列头的数据是%d\n",res); + }catch (Exception e){ + System.out.println(e.getMessage()); + } + break; + case 'e': + scanner.close(); + loop = false; + break; + default: + System.out.println("输入错误,请重新输入:"); + break; + } + } + System.out.println("程序退出"); + + } + +} + +//使用数组模拟队列-编写一个ArrayQueue类 +class ArrayQueue { + + private int maxSize; //表示数组的最大容量 + private int front;//队列头 + private int rear; //队列尾 + private int[] arr; //改数组用于存放数据,模拟队列; + + + //创建队列的构造器 + public ArrayQueue(int arrMaxSize) { + maxSize = arrMaxSize; + arr = new int[maxSize]; + front = -1; //指向队列头部,分析出front是指向队列头的前一个位置 + rear = -1; //指向队列尾,指向队列尾的数据(就是队列最后一个数据) + } + + //判断队列是否满 + public boolean isFull() { + return rear == maxSize - 1; + } + + //判断队列是否为空 + public boolean isEmpty() { + return rear == front; + } + + //添加数据到队列 + public void addQueue(int data) { + + //判断队列是否满了 + if (isFull()) { + System.out.println("队列满,不能加入数据~"); + return; + } + + arr[++rear] = data; + } + + //获取队列的数,出队列 + public int getQueue() { + + //判断队列是否为空 + if (isEmpty()) { + //通过抛出异常的方式进行处理 + throw new RuntimeException("队列空,不能取数据"); + } + + return arr[++front]; + } + + //显示队列的所有数据 + public void showQueue() { + + if (isEmpty()) { + System.out.println("队列为空,没有数据~~"); + return; + } + for (int i = 0; i < arr.length; i++) { + System.out.printf("arr[%d]=%d\n", i, arr[i]); + } + + } + + //显示队列的头数据 + public int headQueue() { + + //判断 + if (isEmpty()) { + + throw new RuntimeException("队列为空,没有数据~~"); + } + return arr[front + 1]; + + } + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/queue/CircleArrayQueueDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/queue/CircleArrayQueueDemo.java new file mode 100644 index 0000000..80b8e34 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/queue/CircleArrayQueueDemo.java @@ -0,0 +1,160 @@ +package com.atguigu.queue; + +import java.util.Scanner; + +public class CircleArrayQueueDemo { + + public static void main(String[] args) { + + //测试 + //创建一个队列 + CircleArrayQueue arrayQueue = new CircleArrayQueue(4);//其队列的有效数据最大是3 + char key = ' '; //接受用户输入 + Scanner scanner = new Scanner(System.in); + boolean loop = true; + //输出一个菜单 + while (loop) { + System.out.println("s(show):显示队列"); + System.out.println("e(exit):退出程序"); + System.out.println("a(add):添加数据到队列"); + System.out.println("g(get):从队列取出数据"); + System.out.println("h(head):查看队列头的数据"); + key = scanner.next().charAt(0); //接受一个字符; + switch (key) { + + case 's': + arrayQueue.showQueue(); + break; + case 'a': + System.out.println("请输出一个数:"); + int num = scanner.nextInt(); + arrayQueue.addQueue(num); + break; + case 'g': + try { + int res = arrayQueue.getQueue(); + System.out.printf("取出的数据是%d\n", res); + + } catch (Exception e) { + System.out.println(e.getMessage()); + } + break; + case 'h': + //查看队列头的数据 + try { + int res = arrayQueue.headQueue(); + System.out.printf("队列头的数据是%d\n", res); + } catch (Exception e) { + System.out.println(e.getMessage()); + } + break; + case 'e': + scanner.close(); + loop = false; + break; + default: + System.out.println("输入错误,请重新输入:"); + break; + } + } + System.out.println("程序退出"); + + } + +} + + +//使用数组模拟循环队列-编写一个CircleArrayQueue类 +class CircleArrayQueue { + + private int maxSize; //表示数组的最大容量 + private int front;//队列头 + private int rear; //队列尾 + private int[] arr; //改数组用于存放数据,模拟队列; + + + //创建队列的构造器 + public CircleArrayQueue(int arrMaxSize) { + maxSize = arrMaxSize; + arr = new int[maxSize]; + front = 0; + rear = 0; + } + + //判断队列是否满 + public boolean isFull() { + return (rear + 1) % maxSize == front; + } + + //判断队列是否为空 + public boolean isEmpty() { + return rear == front; + } + + //添加数据到队列 + public void addQueue(int data) { + + //判断队列是否满了 + if (isFull()) { + System.out.println("队列满,不能加入数据~"); + return; + } + + arr[rear] = data; + //将rear后移,这里必须考虑取模 + rear = (rear + 1) % maxSize; + } + + //获取队列的数,出队列 + public int getQueue() { + + //判断队列是否为空 + if (isEmpty()) { + //通过抛出异常的方式进行处理 + throw new RuntimeException("队列空,不能取数据"); + } + + //这里需要分析出front是指向队列的第一个元素 + //1.先把front对应的值保留到临时变量 + //2.将front后移,取模 + //3.将临时保存的变量返回 + int value = arr[front]; + front = (front + 1) % maxSize; + return value; + } + + //显示队列的所有数据 + public void showQueue() { + + if (isEmpty()) { + System.out.println("队列为空,没有数据~~"); + return; + } + //由于被取出了以后就可以不用遍历 + //考虑从front开始遍历,遍历多少个元素 + + for (int i = front; i < front; i++) { + System.out.printf("arr[%d]=%d\n", i % maxSize, arr[i % maxSize]); + } + + } + + //求出当前队列有效数据的个数 + public int size() { + //假如rear =1 front = 0 maxSize = 3 + //(1+3-0)%3 ==1 + return (rear + maxSize - front) % maxSize; + } + + //显示队列的头数据 + public int headQueue() { + + //判断 + if (isEmpty()) { + + throw new RuntimeException("队列为空,没有数据~~"); + } + return arr[front]; + + } +} \ No newline at end of file diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/MiGong.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/MiGong.java new file mode 100644 index 0000000..58645c2 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/MiGong.java @@ -0,0 +1,89 @@ +package com.atguigu.recursion; + + +/** + * 迷宫问题 + */ +public class MiGong { + + public static void main(String[] args) { + + //创建一个二维数组,模拟迷宫 + int[][] map = new int[8][7]; + //使用1表示墙 + for (int i = 0; i < 8; i++) { + for (int j = 0; j < 7; j++) { + if (i == 0 || j == 0 || i == 7 || j == 6) { + map[i][j] = 1; + } + } + } + + //设置挡板,1表示 + map[3][1]=1; + map[3][2]=1; + + System.out.println("当前地图:"); + for (int i = 0; i < 8; i++) { + for (int j = 0; j < 7; j++) { + System.out.print(map[i][j] + " "); + } + System.out.println(); + } + + //使用递归回溯给小球找路 + setWay(map,1,1); + + //输出新地图 + System.out.println("新地图:"); + for (int i = 0; i < 8; i++) { + for (int j = 0; j < 7; j++) { + System.out.print(map[i][j] + " "); + } + System.out.println(); + } + + + } + + // + + /** + * 使用递归回溯给小球找路 + * 当为0是表示没走过,当为1表示墙,当为2表示通路可以走,3表示该店已经走过 + * 需要确定一个策略(方法), 下->右->上->左,如果该点走不通,在回溯 + * @param map 地图 + * @param i 从哪个位置开始找(1,1) + * @param j + * @return 是否找到通路(6,5) + */ + public static boolean setWay(int[][] map,int i,int j){ + if(map[6][5] == 2){ + return true; + }else { + + if(map[i][j]==0){ + //如果当前这个点没走过 + //按照策略 + map[i][j] = 2; + if(setWay(map,i+1,j)){ + return true; + }else if(setWay(map,i,j+1)){ + return true; + }else if(setWay(map,i-1,j)){ + return true; + }else if(setWay(map,i,j-1)){ + return true; + }else { + //该点走不通,是死路 + map[i][j]=3; + return false; + } + }else { + //map值可能是1,2,3 + return false; + } + + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/Queen8.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/Queen8.java new file mode 100644 index 0000000..a7fc2c4 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/Queen8.java @@ -0,0 +1,76 @@ +package com.atguigu.recursion; + +public class Queen8 { + + //定义一个max表示共有多少个皇后 + int max = 8; + //定义数组array,保存皇后放置位置的结果,比如arr={0,4,7,5,2,6,1,3} + int[] array = new int[max]; + static int count=0; + + public static void main(String[] args) { + + Queen8 queen8 = new Queen8(); + queen8.check(0); + System.out.printf("一共有%d中解法",count); //92 + + } + + /** + * 放置第n个皇后 + * @param n 第n个皇后 + */ + private void check(int n){ + if(n==max){ + //8个皇后已放好 + print(); + return; + } + //依次放入皇后并判断是否冲突 + for (int i = 0; i < max; i++) { + + //先把当前这个皇后n,放到该行的第1列 + array[n] = i; + //判断这个位置是否冲突 + if(judge(n)){ + //不冲突 + //接着放第n+1个皇后 + check(n+1); + } + //如果冲突,就继续执行array[n]=i;即将第n个皇后放置在后移一个位置 + } + + } + + + /** + * 查看当我们放置第n个皇后,就去检测该皇后是否和前面已经摆放的皇后冲突 + * + * @param n 表示第n个皇后 + * @return + */ + private boolean judge(int n) { + + for (int i = 0; i < n; i++) { + + //TODO 说明: + // 1.array[i] == array[n] 表示判断第n个皇后是否和前面的n-1个皇后在同一列 + // 2.Math.abs(n-i) == Math.abs(array[n]-array[i])表示判断第n个皇后是否和第i个皇后在同一斜线 + if (array[i] == array[n] || Math.abs(n - i) == Math.abs(array[n] - array[i])) { + return false; + } + + } + return true; + } + + + //将皇后摆放的位置打印出来 + private void print() { + count++; + for (int i = 0; i < array.length; i++) { + System.out.print(array[i] + " "); + } + System.out.println(); + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/RecursionTest.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/RecursionTest.java new file mode 100644 index 0000000..eec8963 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/recursion/RecursionTest.java @@ -0,0 +1,30 @@ +package com.atguigu.recursion; + +import javax.swing.*; + +public class RecursionTest { + + public static void main(String[] args) { + //test(4); + int res =factorial(4); + System.out.println(res); + + } + + //打印问题 + public static void test(int n) { + + if (n > 2) { + test(n - 1); + } + System.out.println("n=" + n); + } + + //阶乘问题 + public static int factorial(int n) { + if (n == 1) { + return 1; + } else { + return factorial(n - 1) * n; + }} +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/search/BinarySearch.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/search/BinarySearch.java new file mode 100644 index 0000000..09daa60 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/search/BinarySearch.java @@ -0,0 +1,113 @@ +package com.atguigu.search; + + +import java.util.ArrayList; + +/** + * 二分查找 + * 前提:数组是有序的 + */ +public class BinarySearch { + + + public static void main(String[] args) { + + int[] arr = {1, 8, 10, 89, 1000, 1000,1000,1234}; + + + //int resIndex = binarySearch(arr, 0, arr.length - 1, 100); + ArrayList resArrayList = binarySearch2(arr, 0, arr.length - 1, 1000); + System.out.println("resIndex=" + resArrayList); + + + } + + /** + * 二分查找算法 + * + * @param arr 数组 + * @param left 左边的索引 + * @param right 右边的索引 + * @param findVal 要查找的值 + * @return 找到返回下标, 未找到返回-1 + */ + public static int binarySearch(int[] arr, int left, int right, int findVal) { + + + //left>right时,说明递归整个数组,但是没有找到 + if (left > right) { + return -1; + } + int mid = (left + right) / 2; + int midVal = arr[mid]; + + if (findVal > midVal) { + return binarySearch(arr, mid + 1, right, findVal); + } else if (findVal < midVal) { + return binarySearch(arr, left, mid - 1, findVal); + } else { + return mid; + } + + + } + + + // + /** + * 课后思考题:当数组中有多个相同的数值时,如何将所有的设置都查找到 + * + * 思路分析: + * 1.在找到mid索引值,不要马上返回 + * 2.想mid索引值的左边扫描,将所有满足1000的元素的下表,加入到集合ArrayList + * 3.想mid索引值的右边扫描,将所有满足1000的元素的下表,加入到集合ArrayList + * 4.返回ArrayList + */ + public static ArrayList binarySearch2(int[] arr, int left, int right, int findVal) { + + + //left>right时,说明递归整个数组,但是没有找到 + if (left > right) { + return new ArrayList(); + } + int mid = (left + right) / 2; + int midVal = arr[mid]; + + if (findVal > midVal) { + return binarySearch2(arr, mid + 1, right, findVal); + } else if (findVal < midVal) { + return binarySearch2(arr, left, mid - 1, findVal); + } else { + ArrayList resIndexList = new ArrayList<>(); + int temp=mid-1; + //向左扫描 + while(true){ + if(temp<0||arr[temp] !=findVal){ + //退出 + break; + } + //否则,就将temp放入到resIndexList + resIndexList.add(temp); + temp -=1; + } + resIndexList.add(mid); //中间的 + + //向右扫描 + temp=mid+1; + while(true){ + if(temp>arr.length-1||arr[temp] !=findVal){ + //退出 + break; + } + //否则,就将temp放入到resIndexList + resIndexList.add(temp); + temp +=1; + } + return resIndexList; + } + + + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/search/SeqSearch.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/search/SeqSearch.java new file mode 100644 index 0000000..0997185 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/search/SeqSearch.java @@ -0,0 +1,38 @@ +package com.atguigu.search; + +public class SeqSearch { + + + public static void main(String[] args) { + + int[] arr ={1,9,11,-1,34,89}; //没有顺序的数组 + int index=seqSearch(arr,11); + if(index == -1){ + System.out.println("没有找到"); + }else { + System.out.println("找到了,下标为="+index); + } + + + + } + + /** + * 这里实现的线性查找是找到一个满足条件的值,就返回 + * @param arr 数组 + * @param value 查找的值 + * @return + */ + public static int seqSearch(int[] arr,int value){ + + //线性查找是逐一比对,发信啊有向永志,就返回下标 + for (int i = 0; i < arr.length; i++) { + + if(arr[i]==value){ + return i; + } + + } + return -1; + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/BubbleSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/BubbleSort.java new file mode 100644 index 0000000..1432357 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/BubbleSort.java @@ -0,0 +1,63 @@ +package com.atguigu.sort; + + + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; +import java.util.Random; + +public class BubbleSort { + + public static void main(String[] args) { + +// int[] arr = {3,9,-1,10,-2}; +// +// System.out.println("排序前:"); +// System.out.println(Arrays.toString(arr)); + + //测试80000个数据进行测试 + int[] arr =new int[80000]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int)(Math.random()*80000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+date1Str); //排序前的时间:2022-01-14 14:02:53 + + Bubble(arr); + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:"+date2Str); //排序后的时间:2022-01-14 14:03:05 + + + + } + + public static void Bubble(int[] arr){ + int temp = 0; + boolean flag=false; //表示是否交换过 + //冒泡排序:时间复杂度O(n^2) + //优化:如果在交换过程中,没有一次交换就提前结束循环 + for (int i = 0; i < arr.length-1; i++) { + + for (int j = 0; j < arr.length-1-i; j++) { + if (arr[j] > arr[j+1]) { + temp = arr[j]; + arr[j] = arr[j+1]; + arr[j+1] = temp; + flag =true; + } + } + + if(flag ==false){ + //一趟排序中一次都没有交换过 + break; + }else { + flag=false; //重置flag进行下次判断 + } + + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/InsertSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/InsertSort.java new file mode 100644 index 0000000..e0957f4 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/InsertSort.java @@ -0,0 +1,70 @@ +package com.atguigu.sort; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +public class InsertSort { + + public static void main(String[] args) { + + int[] arr = {-1, 9,3 , 10, -2}; + + insertSort(arr); + System.out.println(Arrays.toString(arr)); + + //测试80000个数据进行测试 +// int[] arr = new int[80000]; +// for (int i = 0; i < arr.length; i++) { +// arr[i] = (int) (Math.random() * 80000); //生成一个[0,80000]的数 +// } +// Date date1 = new Date(); +// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +// String date1Str = simpleDateFormat.format(date1); +// System.out.println("排序前的时间:" + date1Str); //排序前的时间:2022-01-14 15:36:45 +// +// insertSort(arr); +// Date date2 = new Date(); +// String date2Str = simpleDateFormat.format(date2); +// System.out.println("排序后的时间:" + date2Str); //排序后的时间:2022-01-14 15:36:46 //不到一秒 + + } + + + //插入排序 + public static void insertSort(int[] arr) { + + //定义待输入的数 + int temp = 0; + + + for (int i = 1; i < arr.length; i++) { + int flag = arr[i]; + int index = i - 1; + //可以实现 +// int index=i; +// for (int j = 0; j < i; j++) { +// +// if (flag < arr[j]) { +// index = j; +// break; +// } +// } +// +// if(index != i){ +// for(int z=i-1;z>=index;z--){ +// arr[z+1]=arr[z]; +// } +// arr[index]=flag; +// } + + while (index >= 0 && flag < arr[index]) { + arr[index + 1] = arr[index]; + index--; + } + + arr[index + 1] = flag; + + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/MergeSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/MergeSort.java new file mode 100644 index 0000000..6bb7aa2 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/MergeSort.java @@ -0,0 +1,122 @@ +package com.atguigu.sort; + +import java.lang.reflect.Array; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +/** + * 归并排序 + */ +public class MergeSort { + + public static void main(String[] args) { + +// int[] arr = {8, 4, 5, 7, 1, 3, 6, 2,0,234}; + +// mergeSort(arr,0,arr.length-1,temp); +// +// System.out.println("归并排序后="+ Arrays.toString(arr)); + + //测试80000个数据进行测试 + int[] arr =new int[8000000]; + int[] temp = new int[arr.length]; //归并排序需要一个额外的空间 + for (int i = 0; i < arr.length; i++) { + arr[i] = (int)(Math.random()*8000000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+date1Str); //排序前的时间:2022-01-17 17:16:31 + + mergeSort(arr,0,arr.length-1,temp); + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:"+date2Str); //排序后的时间:2022-01-17 17:16:32 + //System.out.println("归并排序后="+ Arrays.toString(arr)); + + + } + + /** + * 分 +和的方法 + * @param arr 原始数组 + * @param left 左边的初始索引 + * @param right 右边的初始索引 + * @param temp 临时数组 + */ + public static void mergeSort(int[] arr,int left,int right,int[] temp){ + + if(left pivot) { + r -= 1; + } + + if (l >= r) { + //如果l >= r说明pivot的左右两边的值,已经按照左边全部小于等于pivot值,右边全部是大于等于pivot值 + break; + } + + //如果没有满足则交换 + temp = arr[l]; + arr[l] = arr[r]; + arr[r] = temp; + + //如果交换完后,发现arr[l] ==pivot相等,前移 + if (arr[l] == pivot) { + r -= 1; + } + if (arr[r] == pivot) { + l += 1; + } + + } + //如果l ==r,必须l++,r--,否则会出现栈溢出 + if (l == r) { + l += 1; + r -= 1; + } + + //向左递归 + if (left < r) { + quickSort(arr, left, r); + } + //向右递归 + if (right > l) { + quickSort(arr, l, right); + } + + + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/RadixSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/RadixSort.java new file mode 100644 index 0000000..f67773b --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/RadixSort.java @@ -0,0 +1,100 @@ +package com.atguigu.sort; + + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +/** + * 基数排序(桶排序的扩展) + */ +public class RadixSort { + + + public static void main(String[] args) { + +// int[] arr= {53,3,542,748,14,214}; +// radixSort(arr); + + //测试80000个数据进行测试 + //8千万个数:java.lang.OutOfMemoryError: Java heap space + int[] arr =new int[80000000]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int)(Math.random()*80000000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+date1Str); //排序前的时间:2022-01-18 12:53:42 + + radixSort(arr); + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:"+date2Str); //排序后的时间:2022-01-18 12:53:43 + + + + } + + //基数排序的方法 + public static void radixSort(int[] arr){ + + //第一轮(针对每个元素的各位进行排序处理) + + //定义一个二维数组,表示10个桶,每个桶就是一个一维数组 + //TODO 说明: + // 1.二维数组包含10个一维数组 + // 2.为了防止在放入数的时候,数据溢出,则每个一维数组(桶),大小定位arr.length + // 3.技术排序是使用空间换时间的经典算法 + + int[][] bucket = new int[10][arr.length]; + + //为了记录每个桶中,实际存放了多少个数据,定义一个一维数组来记录各个桶的每次放入的数据个数 + //bucketElementCounts[0]记录的是bucket[0]桶中放入数据个数 + int[] bucketElementCounts =new int[10]; + + //1.得到数组汇总过最大的数的位数 + int max =arr[0]; //假设第一个数就是最大的数 + for(int i = 1;imax){ + max=arr[i]; + } + } + //得到最大数是几位数 + int maxLength = (max+"").length(); + for(int i =0, n= 1;iarr[j]){ + flag=arr[j]; + count=j; + } + } + if(count !=i){ + temp =arr[i]; + arr[i]=arr[count]; + arr[count]=temp; + } + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/ShellSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/ShellSort.java new file mode 100644 index 0000000..dff43e7 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/ShellSort.java @@ -0,0 +1,89 @@ +package com.atguigu.sort; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +public class ShellSort { + + public static void main(String[] args) { + +// int[] arr ={8,9,1,7,2,3,5,4,6,0}; +// shellSort(arr); + + //测试80000个数据进行测试交换法 + int[] arr = new int[80000]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int) (Math.random() * 80000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:" + date1Str); //排序前的时间:2022-01-14 16:22:18 + + //shellSort(arr); + shellSort2(arr); + + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:" + date2Str); //排序后的时间:排序后的时间:2022-01-14 16:22:18 //不到一秒 + //System.out.println( Arrays.toString(arr)); + + + } + + //希尔排序交换法 -8秒左右 + public static void shellSort(int[] arr) { + + int temp = 0; + //希尔排序第一轮 + //第一轮10个数据分为5组 + for (int gap = arr.length; gap > 0; gap /= 2) { + + for (int i = gap; i < arr.length; i++) { + //遍历各组中所有元素(共gap组,每组两个arr.length/gap元素),步长gap + for (int j = i - gap; j >= 0; j -= gap) { + //如果当前元素大于加上步长后的那个元素,说明需要交换 + if (arr[j] > arr[j + gap]) { + temp = arr[j]; + arr[j] = arr[j + gap]; + arr[j + gap] = temp; + } + } + + } + //System.out.printf("希尔排序第轮的结果:%s\n", Arrays.toString(arr)); + } + } + + //希尔排序-移位法 + public static void shellSort2(int[] arr) { + + //增量gap,并逐步所有增量 + for (int gap = arr.length / 2; gap > 0; gap /= 2) { + + //从第gap个元素,诸葛对其所在的组进行直接插入排序 + for (int i = gap; i < arr.length; i++) { + + int j = i; + int temp = arr[j]; + if (arr[j] < arr[j - gap]) { + while (j - gap >= 0 && temp < arr[j - gap]) { + //移动 + arr[j] = arr[j - gap]; + j -= gap; + } + //当退出while后,就给temp找到了插入的位置 + arr[j] = temp; + + } + } + + + } + + + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/BubbleSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/BubbleSort.java new file mode 100644 index 0000000..4488899 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/BubbleSort.java @@ -0,0 +1,82 @@ +package com.atguigu.sort.selftry; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * 冒泡排序自实现 + */ +public class BubbleSort { + + public static void main(String[] args) { + + int[] arr = {3, 9, -1, 10, 20}; + Bubble(arr); + show(arr); + + + //测试5000条数据 + int[] arr1 = new int[80000]; + for (int i = 0; i < arr1.length; i++) { + arr1[i] = (int) (Math.random() * 80000); + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String time1 = simpleDateFormat.format(date1); + System.out.println("排序前的时间:" + time1); + show(arr1); + Bubble(arr1); + System.out.println("排序后:"); + show(arr1); + + + Date date2 = new Date(); + String time2 = simpleDateFormat.format(date2); + System.out.println("排序后的时间:" + time2); + + + } + + public static void Bubble(int[] arr) { + int temp = 0; + boolean flag = false; + + for (int i = 0; i < arr.length - 1; i++) { + for (int j = 0; j < arr.length - i; j++) { + if (j < arr.length - 1) { + if (arr[j] > arr[j + 1]) { + temp = arr[j]; + arr[j] = arr[j + 1]; + arr[j + 1] = temp; + flag = true; + } + } else { + break; + } + + + } + if (!flag) { + //没有交换过,结束循环 + break; + } else { + flag = false; + } +// System.out.printf("第%d次后的结果",i); +// show(arr); +// System.out.println(); + } + + + } + + public static void show(int[] arr) { + + for (int i = 0; i < arr.length; i++) { + System.out.printf(arr[i] + " "); + } + System.out.println(); + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/MergeSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/MergeSort.java new file mode 100644 index 0000000..eab8d8b --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/MergeSort.java @@ -0,0 +1,92 @@ +package com.atguigu.sort.selftry; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +public class MergeSort { + + public static void main(String[] args) { + +// int[] arr = {8, 4, 5, 7, 1, 3, 6, 2,0,234}; +// int[] temp = new int[arr.length]; +// MergeSort(arr, 0, arr.length-1, temp); +// System.out.println(Arrays.toString(arr)); + + //测试80000个数据进行测试 + int[] arr =new int[8000000]; + int[] temp = new int[arr.length]; //归并排序需要一个额外的空间 + for (int i = 0; i < arr.length; i++) { + arr[i] = (int)(Math.random()*8000000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+date1Str); //排序前的时间:2022-01-17 17:16:31 + + MergeSort(arr,0,arr.length-1,temp); + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:"+date2Str); //排序后的时间:2022-01-17 17:16:32 + + + } + + public static void MergeSort(int[] arr, int left, int right, int[] temp) { + if (left < right) { + int mid = (left + right) / 2; + //向左递归分解 + MergeSort(arr, left, mid, temp); + //向右递归分解 + MergeSort(arr, mid + 1, right, temp); + //合并 + Merge(arr, left, mid, right, temp); + + } + + } + + /** + * 将原数组分为左右两边的数组,通过比较两数组依次数组存在temp中, + * 当某一个数组遍历完毕则将另一个数组剩下的元素存入temp中,最后让temp=arr + * + * @param arr + * @param left + * @param mid + * @param right + * @param temp + */ + public static void Merge(int[] arr, int left, int mid, int right, int[] temp) { + int i = left; + int j = mid + 1; + int t = 0; //初始化temp当前索引 + + while (i <= mid && j <= right) { + if (arr[i] < arr[j]) { + temp[t++] = arr[i++]; + } else { + temp[t++] = arr[j++]; + } + } + //左边的数组已全部放入temp + while (j <= right) { + temp[t++] = arr[j++]; + } + + //右边的数组已全部放入temp + while (i <= mid) { + temp[t++] = arr[i++]; + } + + + t = 0; + int tempLeft = left; + while (tempLeft <= right) { + arr[tempLeft++] = temp[t++]; + } + + + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/QuickSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/QuickSort.java new file mode 100644 index 0000000..d468b20 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/QuickSort.java @@ -0,0 +1,97 @@ +package com.atguigu.sort.selftry; + + +import com.sun.corba.se.impl.resolver.SplitLocalResolverImpl; + +/** + * 快排 + */ +public class QuickSort { + + public static void main(String[] args) { + + int[] arr = {2, 5, 1, 9, 6, 4, 8, 7, 0, 3}; + quickSort(arr); + for (int i = 0; i < arr.length; i++) { + System.out.printf(i+" "); + } + + + } + + //数组元素之间的交换 + public static void change(int[] arr, int i, int j) { + int temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + + } + + //对数组内元素进行排序 + public static void quickSort(int[] arr) { + + sort(arr, 0, arr.length - 1); + + + } + + //对数组内指定范围的数据进行排序 + public static void sort(int[] arr, int i, int j) { + + if (i > j) { + return; + } + //分别对i到j左子组和右子组的数据进行排序 + + int partition = partition(arr, i, j); //返回的是分界值所在的索引 + + sort(arr, i, partition - 1); + sort(arr, partition + 1, j); + + } + + + /** + * 对指定元素的数据,获取排序后的位置索引 + * + * @param arr 数组 + * @param i 头位置 + * @param j 尾位置 + * @return + */ + public static int partition(int[] arr, int i, int j) { + + int key = arr[i]; + int left = i; + int right = j+1; + int count =0; + + + while (true) { + while (arr[++left] < key){ + if(left>=j){ + break; + } + } + while (arr[--right]>key){ + if(right<=i){ + break; + } + } + if(left>=right){ + break; + }else { + change(arr, left, right); + + } + + } + change(arr,i,right); + + + return right; + } + + +} + diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/QuickSort1.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/QuickSort1.java new file mode 100644 index 0000000..3d0615b --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/QuickSort1.java @@ -0,0 +1,85 @@ +package com.atguigu.sort.selftry; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +public class QuickSort1 { + + public static void main(String[] args) { + +// int[] arr={2,10,8,22,34,5,2,28,21,11}; +// quickSort(arr,0,arr.length-1); +// System.out.println(Arrays.toString(arr)); + + //测试80000个数据进行测试交换法 + int[] arr = new int[20]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int) (Math.random() * 8000000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:" + date1Str); //排序前的时间:2022-01-14 16:22:18 + + quickSort(arr, 0, arr.length - 1); + System.out.println(Arrays.toString(arr)); + + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:" + date2Str); //排序后的时间:排序后的时间:2022-01-14 16:22:18 //不到一秒 + //System.out.println( Arrays.toString(arr)); + + } + + public static void exchange(int[] arr, int i, int j) { + int temp = arr[j]; + arr[j] = arr[i]; + arr[i] = temp; + + } + + public static void quickSort(int[] arr, int i, int j) { + + if (i > j) { + return; + } + + int index = partition(arr, i, j); + quickSort(arr, i, index - 1); + quickSort(arr, index + 1, j); + + } + + public static int partition(int[] arr, int i, int j) { + + int left = i; + int right = j + 1; + int key = arr[i]; + + while (true) { + + while (left + 1 < arr.length && arr[++left] < key) { + if (left >= j) { + break; + } + + } + while (arr[--right] > key) { + if (right <= i) { + break; + } + } + + if (left >= right) { + break; + } else { + exchange(arr, left, right); + } + } + exchange(arr, i, right); + + return right; + } + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/SelectSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/SelectSort.java new file mode 100644 index 0000000..adeb503 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/SelectSort.java @@ -0,0 +1,69 @@ +package com.atguigu.sort.selftry; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class SelectSort { + + public static void main(String[] args) { + + int[] arr={101,34,119,1}; + selectSort(arr); + show(arr); + + int[] arr1=new int[80000]; + for (int i = 0; i < arr1.length; i++) { + arr1[i]=(int) (Math.random()*80000); + } + + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String time1 = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+time1); + + selectSort(arr1); + + Date date2 = new Date(); + String time2 = simpleDateFormat.format(date2); + System.out.println("排序前的时间:"+time2); + + + + + } + + public static void selectSort(int[] arr){ + + int temp=0; + + for (int i = 0; i < arr.length; i++) { + + int key =arr[i]; + int index=i; + + for (int j = i; j < arr.length; j++) { + if(arr[j]= 1; gap /= 2) { + for (int i = 0; i < gap; i++) { + for (int j = i+gap; j < arr.length; j += gap) { + int key = arr[j]; + int flag = j; + if(key= i+gap && key < arr[flag - gap]) { + arr[flag] = arr[flag - gap]; + flag -= gap; + } + arr[flag]=key; + } + + } + } + } + } + + /** + * 不分小组,8百万个数据,2秒 + * @param arr + */ + public static void shellSort1(int[] arr) { + + for (int gap = arr.length / 2; gap >= 1; gap /= 2) { + + for (int j = gap; j < arr.length; j ++) { + int key = arr[j]; + int flag = j; + if(key= gap && key < arr[flag - gap]) { + arr[flag] = arr[flag - gap]; + flag -= gap; + } + arr[flag]=key; + } + } + } + + } + + + public static void show(int[] arr) { + + for (int i = 0; i < arr.length; i++) { + System.out.printf(arr[i] + " "); + } + System.out.println(); + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/insertSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/insertSort.java new file mode 100644 index 0000000..8f35027 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/insertSort.java @@ -0,0 +1,59 @@ +package com.atguigu.sort.selftry; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class insertSort { + + public static void main(String[] args) { + +// int[] arr = {17, 3, 25, 14, 20, 9}; +// insertSort(arr); +// show(arr); + + //测试80000个数据进行测试 + int[] arr = new int[80000]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int) (Math.random() * 80000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:" + date1Str); //排序前的时间:2022-01-14 15:36:45 + + insertSort(arr); + + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:" + date2Str); //排序后的时间:2022-01-14 15:36:46 //不到一秒 + + + } + + public static void insertSort(int[] arr) { + + + + for (int i = 1; i < arr.length; i++) { + int key = arr[i]; + int flag = i; + while (flag > 0 && key < arr[flag - 1]) { + arr[flag] = arr[flag-1]; + flag--; + } + arr[flag] = key; + + } + + } + + public static void show(int[] arr) { + + for (int i = 0; i < arr.length; i++) { + System.out.printf(arr[i] + " "); + } + System.out.println(); + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/radixSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/radixSort.java new file mode 100644 index 0000000..d9c2d35 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sort/selftry/radixSort.java @@ -0,0 +1,69 @@ +package com.atguigu.sort.selftry; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +public class radixSort { + + + + public static void main(String[] args) { + +// int[] arr = {53, 3, 542, 748, 14, 214}; +//// radixSort(arr); +//// System.out.println(Arrays.toString(arr)); + + int[] arr =new int[80000]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int)(Math.random()*80000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+date1Str); //排序前的时间:2022-01-18 12:53:42 + + radixSort(arr); + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:"+date2Str); //排序后的时间:2022-01-18 12:53:43 + + } + + public static void radixSort(int[] arr) { + + int[][] tongs = new int[10][arr.length]; + int[] num = new int[10]; + int flag = arr[0]; + + for (int i = 1; i < arr.length; i++) { + if (flag < arr[i]) { + flag = arr[i]; + } + } + int length = getLength(flag + ""); + for (int i = 0, n = 1; i < length; i++, n *= 10) { + for (int j = 0; j < arr.length ; j++) { + int shu = arr[j] / n % 10; + tongs[shu][num[shu]++] = arr[j]; + } + int j = 0; + for (int k = 0; k < 10; k++) { + if (num[k] != 0) { + for (int l = 0; l < num[k]; l++) { + arr[j++] =tongs[k][l]; + } + num[k]=0; + } + } + } + + + } + + public static int getLength(String flag) { + return flag.length(); + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sparsearray/sparseArray.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sparsearray/sparseArray.java new file mode 100644 index 0000000..af15f9a --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/sparsearray/sparseArray.java @@ -0,0 +1,87 @@ +package com.atguigu.sparsearray; + +import java.io.FileInputStream; + +public class sparseArray { + + + public static void main(String[] args) { + + //TODO 1.创建一个二维数组11*11 + //0表示没有棋子,1表示黑子,2表示会篮子 + int chessArr1[][] =new int[11][11]; + chessArr1[1][2]=1; + chessArr1[2][3]=2; + + //输出原始的二维数组 + System.out.println("原始的二维数组~~"); + for (int[] row : chessArr1) { + for (int i : row) { + System.out.printf("%d\t",i); + } + System.out.println(); + } + + //TODO 2.将二维数组转换为稀疏数组 + //1)先遍历二维数组得到非0数据的个数 + int sum = 0; + int col =0; + for (int[] row : chessArr1) { + col=row.length; + for (int i : row) { + if(i !=0){ + sum++; + } + } + } + + //2)创建对应的稀疏数组 + int sparseArr[][] =new int[sum+1][3]; + + //3)给稀疏数组赋值 + sparseArr[0][0] =chessArr1.length; + sparseArr[0][1] =col; + sparseArr[0][2] =sum; + + int k=0; //用于记录是第几个值 + //4)遍历二维数组,将非零的值存放在稀疏数组中 + for (int i = 0; i < chessArr1.length; i++) { + for (int j = 0; j < col; j++) { + if(chessArr1[i][j] != 0){ + k++; + sparseArr[k][0] = i; + sparseArr[k][1] = j; + sparseArr[k][2] = chessArr1[i][j]; + } + } + } + System.out.println("====================================="); + System.out.println("得到的稀疏数组为~~~~~~~~"); + for (int[] row : sparseArr) { + for (int i : row) { + System.out.printf("%d\t",i); + } + System.out.println(); + } + + + //TODO 3.将稀疏数组恢复成原始的二维数组 + int chessArr2[][] = new int[sparseArr[0][0]][sparseArr[0][1]]; + int z =0; + for (int[] ints : sparseArr) { + if(z !=0){ + chessArr2[ints[0]][ints[1]] = ints[2]; + } + z++; + } + System.out.println("====================================="); + System.out.println("恢复后的棋盘为~~~~~~~~"); + for (int[] row : chessArr2) { + for (int i : row) { + System.out.printf("%d\t",i); + } + System.out.println(); + } + } + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/ArrayStackDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/ArrayStackDemo.java new file mode 100644 index 0000000..53a9085 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/ArrayStackDemo.java @@ -0,0 +1,114 @@ +package com.atguigu.stack; + + +import java.util.Scanner; + +public class ArrayStackDemo { + + + public static void main(String[] args) { + + //测试ArrayStack是否正确 + //先创建一个ArrayStack对象表示栈 + ArrayStack stack = new ArrayStack(4); + String key = ""; + boolean loop =true; //控制是否退出菜单 + Scanner scanner = new Scanner(System.in); + + while (loop){ + + System.out.println("show: 表示显示栈"); + System.out.println("exit: 退出程序"); + System.out.println("push: 表示添加数据到栈(入栈)"); + System.out.println("pop: 表示从栈取出数据(出栈)"); + System.out.println("请输入你的选择"); + key =scanner.next(); + + if ("show".equals(key)) { + stack.showStack(); + } else if ("push".equals(key)) { + System.out.println("请输入一个数:"); + int value = scanner.nextInt(); + stack.push(value); + } else if ("pop".equals(key)) { + try { + int res = stack.pop(); + System.out.printf("出栈的数据是%d\n", res); + + } catch (Exception e) { + System.out.println(e.getMessage()); + } + } else if ("exit".equals(key)) { + scanner.close(); + loop = false; + } + } + System.out.println("程序退出"); + + + } + + //定义一个栈结构 + public static class ArrayStack{ + + private int maxSize; //栈大小 + private int[] stack; //数组模拟栈,数据就放在该数组中 + private int top =-1; + + public ArrayStack(int maxSize) { + this.maxSize = maxSize; + this.stack = new int[this.maxSize]; + } + + + //栈满 + public boolean isFull(){ + return top == maxSize-1; + } + + //栈空 + public boolean isEmpty(){ + return top==-1; + } + + //入栈-push + public void push(int value){ + + //先判断栈是否已经满了 + if(isFull()){ + System.out.println("栈满了无法放入数据"); + return; + } + top++; + stack[top]=value; + } + + //出栈-pop,将栈顶的数据返回 + public int pop(){ + + //先判断栈是否为空 + if(isEmpty()) { + //抛出异常 + throw new RuntimeException("栈空,没有数据"); + } + + int value=stack[top]; + top--; + return value; + + } + + //显示栈的情况[遍历],遍历时,需要从栈顶开始显示数 + public void showStack(){ + + if(isEmpty()){ + System.out.println("栈空,没有数据"); + return; + } + + for (int i = top; i >=0 ; i--) { + System.out.printf("stack[%d]=%d\n",i,stack[i]); + } + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/Calculator.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/Calculator.java new file mode 100644 index 0000000..56da96b --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/Calculator.java @@ -0,0 +1,212 @@ +package com.atguigu.stack; + +import java.beans.PropertyEditorSupport; + +/** + * 尚且有问题 + * 如果连减就是错的70-2*6-4 + */ +public class Calculator { + + + public static void main(String[] args) { + + String expression = "70+2*6-4"; + + //创建两个栈,一个数栈,一个符号栈 + ArrayStack numStack = new ArrayStack(10); + ArrayStack operStack = new ArrayStack(10); + + //定义需要的相关变量 + int index = 0; //用于扫描 + int num1 = 0; + int num2 = 0; + int oper = 0; + int res = 0; + char ch = ' '; //将每次扫描得到char保存到ch + String keepNum = ""; + //喧哗扫描expression + while (true) { + //一次得到expression的每一个字符 + ch = expression.substring(index, index + 1).charAt(0); + //判断ch是什么,然后做相应的处理 + if (operStack.isOper(ch)) { + + if (!operStack.isEmpty()) { + if (operStack.priority(ch) <= operStack.priority(operStack.peek())) { + num1 = numStack.pop(); + num2 = numStack.pop(); + oper = operStack.pop(); + res = numStack.cal(num1, num2, oper); + //把运算结果放入数栈 + numStack.push(res); + //将当前操作符放入符号栈 + operStack.push(ch); + } else { + operStack.push(ch); + } + } else { + //如果为空,直接入栈 + operStack.push(ch); + } + } else { + //如果是数就入数栈 + + //思路分析: + //1.当处理多位数时,不能发现是一个数就立即入栈,因为特可能是多位数 + //2.在处理数,需要向expression的表达式的index后再看一位,如果是数就进行扫描,如果是符号才入栈 + //3.因此需要定义一个变量用于拼接 + keepNum += ch; + + //如果ch已经是最后一位,就直接入栈 + if(index == expression.length()-1){ + numStack.push(Integer.parseInt(keepNum)); + }else { + if(operStack.isOper(expression.substring(index+1,index+2).charAt(0))){ + //是操作符 + numStack.push(Integer.parseInt(keepNum)); + //清空keeNum + keepNum = ""; + } + } + + + + } + //让index+1,并判断是否扫描到expression的末尾 + index++; + if (index >= expression.length()) { + break; + } + + } + + //当表达式扫描完毕,就顺序的从数栈和符号栈中pop出相应的数和符号,并运算 + while (true) { + //如果符号栈为空,则计算到最后的结果,书展中只有一个数字【结果】 + if (operStack.isEmpty()) { + break; + } + num1 = numStack.pop(); + num2 = numStack.pop(); + oper = operStack.pop(); + res = numStack.cal(num1, num2, oper); + numStack.push(res); + } + System.out.printf("表达式%s = %d", expression, numStack.pop()); + + + } + + //先创建好一个栈 + //扩展功能:判断优先级的方法 + //查看数组还是字符 + public static class ArrayStack { + + private int maxSize; //栈大小 + private int[] stack; //数组模拟栈,数据就放在该数组中 + private int top = -1; + + public ArrayStack(int maxSize) { + this.maxSize = maxSize; + this.stack = new int[this.maxSize]; + } + + //返回当前栈顶的值,但不出栈 + public int peek() { + return stack[top]; + } + + //栈满 + public boolean isFull() { + return top == maxSize - 1; + } + + //栈空 + public boolean isEmpty() { + return top == -1; + } + + //入栈-push + public void push(int value) { + + //先判断栈是否已经满了 + if (isFull()) { + System.out.println("栈满了无法放入数据"); + return; + } + top++; + stack[top] = value; + } + + //出栈-pop,将栈顶的数据返回 + public int pop() { + + //先判断栈是否为空 + if (isEmpty()) { + //抛出异常 + throw new RuntimeException("栈空,没有数据"); + } + + int value = stack[top]; + top--; + return value; + + } + + //显示栈的情况[遍历],遍历时,需要从栈顶开始显示数 + public void showStack() { + + if (isEmpty()) { + System.out.println("栈空,没有数据"); + return; + } + + for (int i = top; i >= 0; i--) { + System.out.printf("stack[%d]=%d\n", i, stack[i]); + } + } + + //返回运算符的优先级,优先级使用数字表示 + //数字越大,则优先级越高 + public int priority(int oper) { + if (oper == '*' || oper == '/') { + return 1; + } else if (oper == '*' || oper == '/') { + return 0; + } else { + return -1; //假定只有+ - * / + } + } + + //判断是不是一个运算符 + public boolean isOper(char val) { + return val == '+' || val == '-' || val == '*' || val == '/'; + } + + //计算方法 + public int cal(int num1, int num2, int oper) { + int res = 0; //res 用于存放计算的结果 + + switch (oper) { + + case '+': + res = num1 + num2; + break; + case '-': + res = num2 - num1; + break; + case '*': + res = num1 * num2; + break; + case '/': + res = num2 / num1; + break; + default: + break; + + } + return res; + } + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/PolandNotation.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/PolandNotation.java new file mode 100644 index 0000000..5b2814c --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/PolandNotation.java @@ -0,0 +1,210 @@ +package com.atguigu.stack; + + +import java.util.ArrayList; +import java.util.List; +import java.util.Stack; + +/** + * 逆波兰计算器求解 + */ +public class PolandNotation { + + + public static void main(String[] args) { + + /* + TODO 完成一个将中缀表达式转成后缀表达式的功能 + 说明: + 1. 1 + ( ( 2 + 3 )× 4) - 5 => 1 2 3 + 4 * + 5 - + 2.因为直接对str进行操作,不方便,因此先将1+((2+3)×4)-5 =>中缀表达式对应的list + 3.将得到的中缀表达式对应的List =>后缀表达式对应的List + */ + String expression = "1+((2+3)*4)-5"; + List stringList = toInfixExpressionList(expression); + System.out.println("中缀表达式对应的List="+stringList); //[1, +, (, (, 2, +, 3, ), ×, 4, ), -, 5] + List parseSuffixExpressionList = parseSuffixExpressionList(stringList); + System.out.println("后续表达式对应的List="+parseSuffixExpressionList); //后续表达式对应的List=[1, 2, 3, +, 4, *, +, 5, -] + System.out.printf("expression=%d",calculate(parseSuffixExpressionList)); //expression=16 + + + +// //先定义一个逆波兰表达式 +// //(30+4)×5-6 => 30 4 + 5 × 6 - =>164 +// //4*5-8+60/2 => 4 5 * 8 - 60 + 8 2 / + =>76 +// //为了方柏霓,逆波兰表达式的数字和字符使用空格隔开 +// String suffixExpression = "4 5 * 8 - 60 + 8 2 / +"; +// /* +// TODO 思路 +// 1.现将"3 4 + 5 × 6 - " 放到ArrayList中 +// 2.将ArrayList传递给一个方法,遍历ArrayList配合栈完成计算 +// */ +// +// //将表达式一次将数据和运算符放入ArrayList中 +// List rpnList = getListString(suffixExpression); +// System.out.println(rpnList); +// int res = calculate(rpnList); +// System.out.println("计算结果是=" + res); + + + } + public static List parseSuffixExpressionList(List ls){ + + //定义两个栈 + Stack s1 = new Stack(); //符号栈 + //s2在整个转换过程中,没有pop操作,且需要逆序输出,因此考虑用ArrayList + ArrayList s2 = new ArrayList(); //存储中间结果的Lists + + //遍历ls + //"1+((2+3)*4)-5" + for(String item: ls){ + + //如果是一个数,加入s2 + if(item.matches("\\d+")){ + s2.add(item); + }else if(item.equals("(")){ + s1.push(item); + }else if(item.equals(")")){ + + //如果是右括号")",则一次弹出s1栈顶的运算符,并压入s2,直到遇到左括号为止,此时将这一对括号丢弃 + while(!s1.peek().equals("(")){ + s2.add(s1.pop()); + } + s1.pop(); //将s1弹出,消除小括号 + }else { + + //当item的优先级,小于等于s1栈顶运算符,将s1栈顶的与运算符弹出并加入到s2中,再次转到4.1 + //问题:缺少一个比较优先级高低的方法 + while(s1.size() != 0 && Operation.getValue(s1.peek()) >=Operation.getValue(item)){ + s2.add(s1.pop()); + } + //将item压入栈中 + s1.push(item); + + } + } + + //将s1中剩余的元素符依次弹出并加入s2 + while(s1.size() != 0){ + s2.add(s1.pop()); + } + return s2; //逆序输出后就是后缀表达式 + + } + + //编写一个方法,可以返回一个运算符的优先级 + public static class Operation{ + + private static int ADD =1; + private static int SUB =1; + private static int MUL =2; + private static int DIV =2; + + //写一个方法返回对应的优先级 + public static int getValue(String operation){ + + int result =0; + if(operation.equals("+") ){ + result =ADD; + }else if(operation.equals("-")){ + result =SUB; + }else if(operation.equals("*")){ + result =MUL; + }else if(operation.equals("/")){ + result =DIV; + }else { + System.out.println("小括号"); + } + + return result; + + + + } + + + } + + //方法:将中缀表达式转成对应的List + public static List toInfixExpressionList(String s) { + + //定义一个List,存放中中缀表达式对应的内容 + List ls = new ArrayList(); + + int i = 0; //用于遍历中缀表达式字符串 + String str; //对多位数的拼接 + char c; //没遍历一个数就放到c + do { + + if ((c = s.charAt(i)) < 48 || (c = s.charAt(i)) > 57) { + //如果是一个非数字就加入ls + ls.add("" + c); + i++; + } else { + //如果是一个数,考虑多位数 + str = ""; + while (i < s.length() && (c = s.charAt(i)) >= 48 && (c = s.charAt(i)) <= 57) { + str +=c; + i++; + } + ls.add(str); + } + } while (i < s.length()); + return ls; + } + + + public static List getListString(String suffixExpression) { + + String[] split = suffixExpression.split(" "); + + List list = new ArrayList(); + + for (String s : split) { + list.add(s); + } + return list; + + } + + //完成对逆波兰表达式的运算 + public static int calculate(List ls) { + + //创建一个栈,只需要一个栈即可 + Stack stack = new Stack(); + + //遍历ls + for (String item : ls) { + + //使用正则表达式取出数 + if (item.matches("\\d+")) { + //匹配的是多位数,入栈 + stack.push(item); + + } else { + //pop出两个数,并运算,在入栈 + int num2 = Integer.parseInt(stack.pop()); + int num1 = Integer.parseInt(stack.pop()); + int res = 0; + if (item.equals("+")) { + res = num1 + num2; + } else if (item.equals("-")) { + res = num1 - num2; + } else if (item.equals("*")) { + res = num1 * num2; + } else if (item.equals("/")) { + res = num1 / num2; + } else { + throw new RuntimeException("运算符有误"); + } + //把res入栈 + stack.push("" + res); + } + + + } + //最后留在stack中的数据就是运算结果 + return Integer.parseInt(stack.pop()); + + } +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/SingleLinkedListStackTry.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/SingleLinkedListStackTry.java new file mode 100644 index 0000000..1c92390 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/stack/SingleLinkedListStackTry.java @@ -0,0 +1,164 @@ +package com.atguigu.stack; + +/** + * 链表模拟栈 + */ +public class SingleLinkedListStackTry { + + public static void main(String[] args) { + + //进行测试 + //先创建节点 + HeroNode hero1 = new HeroNode(1, "宋江", "及时雨"); + HeroNode hero2 = new HeroNode(2, "卢俊义", "玉麒麟"); + HeroNode hero3 = new HeroNode(3, "吴用", "智多星"); + HeroNode hero4 = new HeroNode(4, "林冲", "豹子头"); + + SingleLinkedListStack singleLinkedListStack = new SingleLinkedListStack(4); + + singleLinkedListStack.push(hero1); + singleLinkedListStack.push(hero2); + singleLinkedListStack.push(hero3); + singleLinkedListStack.push(hero4); + singleLinkedListStack.showLinkedList(); + + HeroNode pop = singleLinkedListStack.pop(); + System.out.println("出栈的值:"+pop); + HeroNode pop1 = singleLinkedListStack.pop(); + System.out.println("出栈的值:"+pop1); + singleLinkedListStack.pop(); + singleLinkedListStack.pop(); + System.out.println("现在的栈:"); + singleLinkedListStack.showLinkedList(); + + + } + + //定义一个SingleLinkedList管理我们的英雄 + public static class SingleLinkedListStack { + //先初始化一个头节点,头节点不动,不存放具体的数据 + private HeroNode head = new HeroNode(0, "", ""); + private int maxSize; + + public SingleLinkedListStack(int maxSize) { + this.maxSize = maxSize; + } + public int getLength(){ + + HeroNode temp =head; + int num =0; + while (true){ + + if(temp.next==null){ + break; + } + num++; + temp=temp.next; + } + return num; + } + + //链表模拟入栈 + private void push(HeroNode data){ + + if(getLength()>=maxSize){ + System.out.println("栈满,无法加入"); + return; + } + + HeroNode temp = head.next; + HeroNode cur = null; + boolean flag =false; + + if(temp!=null){ + flag=true; + } + + if(flag){ + cur=temp; + head.next=data; + data.next=cur; + }else { + head.next=data; + } + } + + + //链表模拟出栈 + public HeroNode pop(){ + + if(head.next==null){ + throw new RuntimeException("栈空,无法出栈"); + } + + HeroNode temp =head.next; + HeroNode cur=null; + HeroNode value =temp; + + cur=temp.next; + head.next=cur; + return temp; + } + + + + /** + * 显示链表 + */ + public void showLinkedList() { + //判断链表是否为空 + if (head.next == null) { + System.out.println("链表为空"); + return; + } + //遍历 + HeroNode temp = head.next; + while (true) { + //判断是否到链表的结尾 + if (temp == null) { + break; + } + //输出节点信息 + System.out.println(temp); + temp = temp.next; + } + } + + } + + //定义HeroNode,每个HeroNode对象就是一个节点 + public static class HeroNode { + + private int no; + private String name; + public String nickname; + private HeroNode next; + + public HeroNode() { + } + + public HeroNode(int no, String name, String nickname) { + this.no = no; + this.name = name; + this.nickname = nickname; + } + + public HeroNode(int no, String name, String nickname, HeroNode next) { + this.no = no; + this.name = name; + this.nickname = nickname; + this.next = next; + } + + @Override + public String toString() { + return "HeroNode{" + + "no=" + no + + ", name='" + name + '\'' + + ", nickname='" + nickname + '\'' + + '}'; + } + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/ArrBinaryTreeDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/ArrBinaryTreeDemo.java new file mode 100644 index 0000000..3190526 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/ArrBinaryTreeDemo.java @@ -0,0 +1,58 @@ +package com.atguigu.tree; + +/** + * 如何将一个数组转化为一个顺序存储的满二叉树 + */ +public class ArrBinaryTreeDemo { + + public static void main(String[] args) { + + int[] arr = {1, 2, 3, 4, 5, 6, 7}; + + //创建一个ArrBinaryTree + ArrayBinaryTree arrayBinaryTree = new ArrayBinaryTree(arr); + arrayBinaryTree.preOrder(); + } + +} + +//编写一个ArrayBinaryTree,实现顺序存储二叉树遍历 +class ArrayBinaryTree { + private int[] arr;//存储数据节点的数组 + + public ArrayBinaryTree(int[] arr) { + this.arr = arr; + } + + //重载preOrder + public void preOrder(){ + this.preOrder(0); + } + + /** + * 编写一个方法,完成顺序存储二叉树的一个前序遍历 + * 第n个元素的左子节点为2*n+1 + * 第n个元素的右子节点为2*n+2 + * 第n个元素的父节点为(n-1)/2 + * @param index 数组的下标 + */ + public void preOrder(int index) { + + //如果数组为空,或者arr.length=0 + if (arr == null || arr.length == 0) { + System.out.println("数组为空,不能按照二叉树的前序遍历"); + } + //输出当前这个元素 + System.out.println(arr[index]); + //向左递归调用 + if ((index * 2 + 1) < arr.length) { + preOrder(index * 2 + 1); + } + //向右递归遍历 + if((index * 2 + 2) < arr.length){ + preOrder(index*2+2); + } + + } + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/BinaryTreeDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/BinaryTreeDemo.java new file mode 100644 index 0000000..1c85975 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/BinaryTreeDemo.java @@ -0,0 +1,326 @@ +package com.atguigu.tree; + +public class BinaryTreeDemo { + + public static void main(String[] args) { + //创建一个二叉树 + binaryTree binaryTree = new binaryTree(); + //创建节点 + HeroNode root = new HeroNode(1, "宋江"); + HeroNode heroNode2 = new HeroNode(2, "吴用"); + HeroNode heroNode3 = new HeroNode(3, "卢俊义"); + HeroNode heroNode4 = new HeroNode(4, "林冲"); + HeroNode heroNode5 = new HeroNode(5, "关胜"); + + //先手动创建二叉树,后续可以递归创建二叉树 + root.setLeft(heroNode2); + root.setRight(heroNode3); + heroNode3.setRight(heroNode4); + heroNode3.setLeft(heroNode5); + binaryTree.setRoot(root); + +// //前序遍历 +// System.out.println("前序遍历:"); +// binaryTree.preOrder(); +// +// //中序遍历 +// System.out.println("中序遍历:"); +// binaryTree.infixOrder(); +// +// //后序遍历 +// System.out.println("后序遍历:"); +// binaryTree.postOrder(); + +// //前序查找 +// System.out.println("前序查找"); +// HeroNode heroNode = binaryTree.preOrderSearch(4); +// System.out.println(heroNode); + + //删除节点 + System.out.println("删除前的前序遍历"); + binaryTree.preOrder(); //1 2 3 5 4 + binaryTree.delNode(5); + System.out.println("删除后的前序遍历"); + binaryTree.preOrder(); + + + } +} + +//创建一个二叉树 +class binaryTree { + private HeroNode root; + + public void setRoot(HeroNode root) { + this.root = root; + } + + //前序遍历 + public void preOrder() { + this.root.preOrder(); + } + + //中序遍历 + public void infixOrder() { + this.root.infixOrder(); + } + + //前序遍历 + public void postOrder() { + this.root.postOrder(); + } + + public HeroNode preOrderSearch(int no) { + HeroNode heroNode = root.preOrderSearch(no); + if (heroNode == null) { + System.out.println("未找到节点"); + } + return heroNode; + + } + + public HeroNode infixOrderSearch(int no) { + HeroNode heroNode = root.infixOrderSearch(no); + if (heroNode == null) { + System.out.println("未找到节点"); + } + return heroNode; + + } + + public HeroNode postOrderSearch(int no) { + HeroNode heroNode = root.postOrderSearch(no); + if (heroNode == null) { + System.out.println("未找到节点"); + } + return heroNode; + } + + public Boolean delNode(int no) { + if (root == null) { + System.out.println("该子树目前为空,无法删除"); + return false; + } else { + if (root.getNo() == no) { + root = null; + return true; + } + return root.delNode(no); + } + } + +} + +//创建HeroNode节点 +class HeroNode { + private int no; + private String name; + private HeroNode left; //默认为null + private HeroNode right; //默认为null + + public HeroNode(int no, String name) { + this.no = no; + this.name = name; + } + + public int getNo() { + return no; + } + + public void setNo(int no) { + this.no = no; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public HeroNode getLeft() { + return left; + } + + public void setLeft(HeroNode left) { + this.left = left; + } + + public HeroNode getRight() { + return right; + } + + public void setRight(HeroNode right) { + this.right = right; + } + + @Override + public String toString() { + return "HeroNode{" + + "no=" + no + + ", name='" + name + '\'' + + '}'; + } + + //前序遍历 + public void preOrder() { + if (this != null) { + System.out.println(this); + if (this.left != null) { + this.left.preOrder(); + } + if (this.right != null) { + this.right.preOrder(); + } + } else { + System.out.println("当前二叉树为空"); + return; + } + } + + //中序遍历 + public void infixOrder() { + if (this != null) { + + if (this.left != null) { + this.left.infixOrder(); + } + System.out.println(this); + if (this.right != null) { + this.right.infixOrder(); + } + } else { + System.out.println("当前二叉树为空"); + return; + } + } + + //后序遍历 + public void postOrder() { + if (this != null) { + + if (this.left != null) { + this.left.postOrder(); + } + if (this.right != null) { + this.right.postOrder(); + } + System.out.println(this); + } else { + System.out.println("当前二叉树为空"); + return; + } + } + + //前序查找 + public HeroNode preOrderSearch(int no) { + + if (this == null) { + System.out.println("当前子节点为空"); + return null; + } else { + if (this.no == no) { + return this; + } + HeroNode resNode = null; + if (this.left != null) { + resNode = this.left.preOrderSearch(no); + } + if (resNode == null) { + if (this.right != null) { + resNode = this.right.preOrderSearch(no); + } + } + + return resNode; + } + } + + //中序查找 + public HeroNode infixOrderSearch(int no) { + + if (this == null) { + System.out.println("当前子节点为空"); + return null; + } else { + + HeroNode resNode = null; + if (this.left != null) { + resNode = this.left.preOrderSearch(no); + } + + + if (resNode == null) { + if (this.no == no) { + return this; + } + if (this.right != null) { + resNode = this.right.preOrderSearch(no); + } + } + return resNode; + } + } + + //后序查找 + public HeroNode postOrderSearch(int no) { + + if (this == null) { + System.out.println("当前子节点为空"); + return null; + } else { + + HeroNode resNode = null; + if (this.left != null) { + resNode = this.left.preOrderSearch(no); + } + if (resNode == null) { + if (this.right != null) { + resNode = this.right.preOrderSearch(no); + } + if (resNode == null) { + if (this.no == no) { + return this; + } + } + } + return resNode; + } + } + + /** + * 递归删除节点: + * 1.如果删除的节点是叶子结点,就删除该节点 + * 2.如果删除的节点是非叶子节点,则删除该子树 + * + * @param no 要删除的节点编号 + */ + public Boolean delNode(int no) { + + if (this.left != null && this.left.no == no) { + this.left = null; + return true; + } + if (this.right != null && this.right.no == no) { + this.right = null; + return true; + } + + Boolean flag = false; + if (this.left != null) { + flag = this.left.delNode(no); + } + if (!flag) { + if (this.right != null) { + flag = this.right.delNode(no); + } + } + + return flag; + + + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/HeapSort.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/HeapSort.java new file mode 100644 index 0000000..2169512 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/HeapSort.java @@ -0,0 +1,97 @@ +package com.atguigu.tree; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +/** + * 堆排序 + */ +public class HeapSort { + + public static void main(String[] args) { + +// int[] arr = {20, 50, 45, 40, 35,10,30,15,25}; +// //要求将数组按升序排列 +// heapSort(arr); +// System.out.println(Arrays.toString(arr)); + + //测试80000个数据进行测试 + int[] arr =new int[8000000]; + for (int i = 0; i < arr.length; i++) { + arr[i] = (int)(Math.random()*8000000); //生成一个[0,80000]的数 + } + Date date1 = new Date(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String date1Str = simpleDateFormat.format(date1); + System.out.println("排序前的时间:"+date1Str); //排序前的时间:2022-02-15 21:19:36 + + heapSort(arr); + Date date2 = new Date(); + String date2Str = simpleDateFormat.format(date2); + System.out.println("排序后的时间:"+date2Str); //排序后的时间:2022-02-15 21:19:40 + + + } + + /** + * 编写一个堆排序的方法 + */ + public static void heapSort(int[] arr) { + + //TODO (1)将无序序列构建成一个堆,根据升序降序需求选择大顶堆或者小顶堆 + //arr.length/2-1求出来的是完全二叉树的最后一个非叶子节点 + for (int i = arr.length/2-1; i >= 0; i--) { + adjustHeap(arr,i,arr.length); + } + + + int temp=0; + //TODO (2)将顶对元素与末尾元素交换,将最大元素放置在数组末尾 + //TODO (3)重新调整结构,使其满足堆定义,然后继续交换对顶元素与当前末尾元素,贩毒执行调整+交换步骤,直到整个序列有序 + for (int i = arr.length-1; i >0; i--) { + //交换 + temp=arr[i]; + arr[i]=arr[0]; + arr[0]=temp; + adjustHeap(arr,0,i); + + } + + + } + + /** + * 前提:该节点的所有子节点都已经是大顶堆了 + * 将以第i个位置为根节点时以下树,调整成一个大顶堆 + * + * @param arr 待调整的数组 + * @param i 表示非叶子节点在数组的中的索引 + * @param length 表示对多少各位元素继续调整,length是在逐渐地减小的 + */ + public static void adjustHeap(int[] arr, int i, int length) { + + int temp = arr[i];//将当前数组的元素值,保存在临时变量 + + //开始调整 + //说明:j = i * 2 + 1 ;这里k就是i节点的左子节点 + for (int j = i * 2 + 1; j < length; j = j * 2 + 1) { + if (j + 1 < length && arr[j] < arr[j + 1]) { + //左子节点的值小于右子节点的值 + j++; //j指向右子节点 + } + if (arr[j] > temp) { + //如果子节点大于父节点 + arr[i] = arr[j];//把较大的值赋给当前节点 + i = j; //将i指向j,继续循环比较 + }else { + break; + } + } + //当for循环结束后,我们已经将以i为父节点的树的最大值,放在了i的位置 + arr[i]=temp; //将temp值放在调整后的位置 + + } + + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/Test.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/Test.java new file mode 100644 index 0000000..91b9316 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/Test.java @@ -0,0 +1,16 @@ +package com.atguigu.tree; + +import java.util.ArrayList; + +public class Test { + + public static void main(String[] args) { + + //以ArrayList底层为例,看看底层是如何实现扩容的 + //底层:transient Object[] elementData;维护了一个可扩容的Object数组 + //当数组需要扩容时会调用grow方法进行扩容 + ArrayList objects = new ArrayList(); + + } + +} diff --git a/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/Threadedbinarytree/ThreadedBinaryTreeDemo.java b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/Threadedbinarytree/ThreadedBinaryTreeDemo.java new file mode 100644 index 0000000..d31c608 --- /dev/null +++ b/DataStructures_Algorithm/DataStructures/src/main/java/com/atguigu/tree/Threadedbinarytree/ThreadedBinaryTreeDemo.java @@ -0,0 +1,416 @@ +package com.atguigu.tree.Threadedbinarytree; + +public class ThreadedBinaryTreeDemo { + + public static void main(String[] args) { + + //测试中序线索化二叉树的功能 + HeroNode root = new HeroNode(1, "tom"); + HeroNode node2 = new HeroNode(3, "jack"); + HeroNode node3 = new HeroNode(6, "smith"); + HeroNode node4 = new HeroNode(8, "mary"); + HeroNode node5 = new HeroNode(10, "king"); + HeroNode node6 = new HeroNode(14, "dim"); + + //二叉树,后面我们要递归创建,现在简单处理使用手动创建 + root.setLeft(node2); + root.setRight(node3); + node2.setLeft(node4); + node2.setRight(node5); + node3.setLeft(node6); + + //测试中序线索化 + ThreadedBinaryTree threadedBinaryTree = new ThreadedBinaryTree(); + threadedBinaryTree.setRoot(root); + threadedBinaryTree.threadedNodes(); + + //测试:以10号节点进行测试 + HeroNode leftNode = node5.getLeft(); + HeroNode rightNode = node5.getRight(); + System.out.println("10号节点的前驱结点是:"+leftNode); //3 + System.out.println("10号节点的后继结点是:"+rightNode); //1 + + //当线索化二叉树后,不能再使用以前的遍历方法了 + System.out.println("使用线索化的方式遍历线索化二叉树:"); + threadedBinaryTree.threadedList(); //8,3,10,1,14,6 + + + } + +} + +//定义ThreadedBinaryTree实现了线索化功能二叉树 +class ThreadedBinaryTree { + private HeroNode root; + + //为了实现线索化,需要创建要给指向当前节点的前驱结点的指针 + //在递归进行线索化时,pre总是保留前一个节点 + private HeroNode pre = null; + + + public void setRoot(HeroNode root) { + this.root = root; + } + + //重载threadedNodes方法 + public void threadedNodes(){ + this.threadedNodes(root); + } + + + /** + * 遍历线索化二叉树的方法 + * + */ + public void threadedList(){ + //定义一个变量,存储当前遍历的节点,从root开始 + HeroNode node =root; + while(node !=null){ + //循环找到leftType == 1,第一个找到的就是8节点 + //当leftType==1.说明该节点是按照线索化处理后的有效节点 + while(node.getLeftType()==0){ + node=node.getLeft(); + } + //打印当前及诶单 + System.out.println(node); + //如果当前节点的右节点指向的是后稷街店,就一直输出 + while(node.getRightType() ==1){ + node=node.getRight(); + System.out.println(node); + } + //替换这个遍历的节点 + node=node.getRight(); + } + + + } + + + /** + * 编写对二叉树进行中序线索化的方法 + * + * @param node 当前需要线索化的节点 + */ + public void threadedNodes(HeroNode node) { + + if (node == null) { + //无法线索化 + return; + } + + //TODO (一)先线索化左子树 + threadedNodes(node.getLeft()); + + + //TODO (二)线索化当前节点 + + //处理当前节点的前驱节点 + if (node.getLeft() == null) { + //让当前节点的左指针指向前驱结点 + node.setLeft(pre); + //修改当前节点的左指针的类型,指向前驱结点 + node.setLeftType(1); + } + //处理的当前节点的后继节点 + if (pre != null && pre.getRight() == null) { + //让前驱结点的有指针指向当前节点 + pre.setRight(node); + //修改前驱结点的右指针类型 + pre.setRightType(1); + } + //每处理一个节点后,让当前节点是下一个节点的前驱节点 + pre=node; + + + //TODO (三)线索化右子数 + threadedNodes(node.getRight()); + + } + + //前序遍历 + public void preOrder() { + this.root.preOrder(); + } + + //中序遍历 + public void infixOrder() { + this.root.infixOrder(); + } + + //前序遍历 + public void postOrder() { + this.root.postOrder(); + } + + public HeroNode preOrderSearch(int no) { + HeroNode heroNode = root.preOrderSearch(no); + if (heroNode == null) { + System.out.println("未找到节点"); + } + return heroNode; + + } + + public HeroNode infixOrderSearch(int no) { + HeroNode heroNode = root.infixOrderSearch(no); + if (heroNode == null) { + System.out.println("未找到节点"); + } + return heroNode; + + } + + public HeroNode postOrderSearch(int no) { + HeroNode heroNode = root.postOrderSearch(no); + if (heroNode == null) { + System.out.println("未找到节点"); + } + return heroNode; + } + + public Boolean delNode(int no) { + if (root == null) { + System.out.println("该子树目前为空,无法删除"); + return false; + } else { + if (root.getNo() == no) { + root = null; + return true; + } + return root.delNode(no); + } + } + +} + +//创建HeroNode +class HeroNode { + private int no; + private String name; + private HeroNode left; //默认为null + private HeroNode right; //默认为null + + //说明: + //1.如果leftType==0表示指向的是左子树,如果是1则表示前驱节点 + //1.如果rightType==0表示指向的是右子树,如果是1则表示后继节点 + private int leftType; + private int rightType; + + public int getLeftType() { + return leftType; + } + + public void setLeftType(int leftType) { + this.leftType = leftType; + } + + public int getRightType() { + return rightType; + } + + public void setRightType(int rightType) { + this.rightType = rightType; + } + + public HeroNode(int no, String name) { + this.no = no; + this.name = name; + } + + public int getNo() { + return no; + } + + public void setNo(int no) { + this.no = no; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public HeroNode getLeft() { + return left; + } + + public void setLeft(HeroNode left) { + this.left = left; + } + + public HeroNode getRight() { + return right; + } + + public void setRight(HeroNode right) { + this.right = right; + } + + @Override + public String toString() { + return "HeroNode{" + + "no=" + no + + ", name='" + name + '\'' + + '}'; + } + + //前序遍历 + public void preOrder() { + if (this != null) { + System.out.println(this); + if (this.left != null) { + this.left.preOrder(); + } + if (this.right != null) { + this.right.preOrder(); + } + } else { + System.out.println("当前二叉树为空"); + return; + } + } + + //中序遍历 + public void infixOrder() { + if (this != null) { + + if (this.left != null) { + this.left.infixOrder(); + } + System.out.println(this); + if (this.right != null) { + this.right.infixOrder(); + } + } else { + System.out.println("当前二叉树为空"); + return; + } + } + + //后序遍历 + public void postOrder() { + if (this != null) { + + if (this.left != null) { + this.left.postOrder(); + } + if (this.right != null) { + this.right.postOrder(); + } + System.out.println(this); + } else { + System.out.println("当前二叉树为空"); + return; + } + } + + //前序查找 + public HeroNode preOrderSearch(int no) { + + if (this == null) { + System.out.println("当前子节点为空"); + return null; + } else { + if (this.no == no) { + return this; + } + HeroNode resNode = null; + if (this.left != null) { + resNode = this.left.preOrderSearch(no); + } + if (resNode == null) { + if (this.right != null) { + resNode = this.right.preOrderSearch(no); + } + } + + return resNode; + } + } + + //中序查找 + public HeroNode infixOrderSearch(int no) { + + if (this == null) { + System.out.println("当前子节点为空"); + return null; + } else { + + HeroNode resNode = null; + if (this.left != null) { + resNode = this.left.preOrderSearch(no); + } + + + if (resNode == null) { + if (this.no == no) { + return this; + } + if (this.right != null) { + resNode = this.right.preOrderSearch(no); + } + } + return resNode; + } + } + + //后序查找 + public HeroNode postOrderSearch(int no) { + + if (this == null) { + System.out.println("当前子节点为空"); + return null; + } else { + + HeroNode resNode = null; + if (this.left != null) { + resNode = this.left.preOrderSearch(no); + } + if (resNode == null) { + if (this.right != null) { + resNode = this.right.preOrderSearch(no); + } + if (resNode == null) { + if (this.no == no) { + return this; + } + } + } + return resNode; + } + } + + /** + * 递归删除节点: + * 1.如果删除的节点是叶子结点,就删除该节点 + * 2.如果删除的节点是非叶子节点,则删除该子树 + * + * @param no 要删除的节点编号 + */ + public Boolean delNode(int no) { + + if (this.left != null && this.left.no == no) { + this.left = null; + return true; + } + if (this.right != null && this.right.no == no) { + this.right = null; + return true; + } + + Boolean flag = false; + if (this.left != null) { + flag = this.left.delNode(no); + } + if (!flag) { + if (this.right != null) { + flag = this.right.delNode(no); + } + } + + return flag; + } +} diff --git a/DataStructures_Algorithm/pom.xml b/DataStructures_Algorithm/pom.xml new file mode 100644 index 0000000..6c201d2 --- /dev/null +++ b/DataStructures_Algorithm/pom.xml @@ -0,0 +1,16 @@ + + + 4.0.0 + + com.atguigu.DataStructures_Algorithm + DataStructures_Algorithm + pom + 1.0-SNAPSHOT + + DataStructures + + + + \ No newline at end of file diff --git a/Leecode/pom.xml b/Leecode/pom.xml new file mode 100644 index 0000000..b4c264f --- /dev/null +++ b/Leecode/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + org.example + Leecode + 1.0-SNAPSHOT + + + org.projectlombok + lombok + RELEASE + compile + + + + + \ No newline at end of file diff --git a/Leecode/src/main/java/listnode/addTwoNumbers.java b/Leecode/src/main/java/listnode/addTwoNumbers.java new file mode 100644 index 0000000..4e71e10 --- /dev/null +++ b/Leecode/src/main/java/listnode/addTwoNumbers.java @@ -0,0 +1,97 @@ +package listnode; +/** + * Definition for singly-linked list. + * public class ListNode { + * int val; + * ListNode next; + * ListNode() {} + * ListNode(int val) { this.val = val; } + * ListNode(int val, ListNode next) { this.val = val; this.next = next; } + * } + */ + +import com.sun.corba.se.impl.resolver.SplitLocalResolverImpl; + +/** + * 2.两数相加 + */ +public class addTwoNumbers { + + public static void main(String[] args) { + + ListNode l1 = new ListNode(9); +// l1.next=new ListNode(4); +// l1.next.next=new ListNode(3); + + ListNode l2 = new ListNode(1); + l2.next = new ListNode(9); + l2.next.next = new ListNode(9); + l2.next.next.next = new ListNode(9); + l2.next.next.next.next = new ListNode(9); + l2.next.next.next.next.next = new ListNode(9); + l2.next.next.next.next.next.next = new ListNode(9); + l2.next.next.next.next.next.next.next = new ListNode(9); + l2.next.next.next.next.next.next.next.next = new ListNode(9); + l2.next.next.next.next.next.next.next.next.next = new ListNode(9); + addTwoNums(l1, l2); + + + } + + //两非空链表 + public static ListNode addTwoNums(ListNode l1, ListNode l2) { + + ListNode head = null; + ListNode tail = null; + + int carry = 0; + + while (l1 != null || l2 != null) { + + int num1 = l1 == null ? 0 : l1.val; + int num2 = l2 == null ? 0 : l2.val; + carry = num1 + num2 + carry; + + if (head == null) { + head = tail = new ListNode(carry % 10); + } else { + tail.next = new ListNode(carry % 10); + tail = tail.next; + } + carry /= 10; + + if (l1 != null) { + l1 = l1.next; + } + if (l2 != null) { + l2 = l2.next; + } + } + + if (carry != 0) { + tail.next = new ListNode(carry); + } + + return head; + + + } + + public static class ListNode { + int val; + ListNode next; + + ListNode() { + } + + ListNode(int val) { + this.val = val; + } + + ListNode(int val, ListNode next) { + this.val = val; + this.next = next; + } + } + +} diff --git a/Leecode/src/main/java/listnode/mergeKLists.java b/Leecode/src/main/java/listnode/mergeKLists.java new file mode 100644 index 0000000..03b0938 --- /dev/null +++ b/Leecode/src/main/java/listnode/mergeKLists.java @@ -0,0 +1,100 @@ +package listnode; + +public class mergeKLists { + + public static void main(String[] args) { + + ListNode[] lists=new ListNode[1]; + + ListNode l0 = new ListNode(); +// l0.next=new ListNode(4); +// l0.next.next=new ListNode(5); + + ListNode l1 = new ListNode(1); + l1.next=new ListNode(3); + l1.next.next=new ListNode(4); + + + ListNode l2 = new ListNode(2); +// l2.next = new ListNode(2); + l2.next = new ListNode(6); +// l2.next.next =new ListNode(4); + + lists[0]=l0; +// lists[1]=l1; +// lists[2]=l2; + + ListNode listNode = mergeKLists(lists); + + + } + + + /** + * 分治算法思路求解 + * @param lists + * @return + */ + public static ListNode mergeKLists(ListNode[] lists){ + + int k=lists.length; + + return mergeLists(lists,0,k-1); + + } + public static ListNode mergeLists(ListNode[] list,int head,int tail){ + + if(head==tail){ + return list[head]; + } + if(head>tail){ + return null; + } + int mid=(head+tail)/2; + ListNode listNode1 = mergeLists(list, head, mid); + ListNode listNode2 = mergeLists(list, mid + 1, tail); + + return mergeTwoLists(listNode1,listNode2); + } + + public static ListNode mergeTwoLists(ListNode listNode1,ListNode listNode2){ + if(listNode1==null){ + return listNode2; + }else if(listNode2==null){ + return listNode1; + }else if(listNode1.vallists[i].val){ + min=lists[i].val; + flag=i; + } + } + } + head.next=lists[flag]; + head=head.next; + lists[flag]=lists[flag].next; + } + + + return dust.next.next; + + } + public static Boolean isEmpty(ListNode[] lists){ + + for (int i = 0; i < lists.length; i++) { + if(lists[i]!=null){ + return false; + } + } + return true; + } + + public static class ListNode { + int val; + ListNode next; + + ListNode() { + } + + ListNode(int val) { + this.val = val; + } + + ListNode(int val, ListNode next) { + this.val = val; + this.next = next; + } + } +} diff --git a/Leecode/src/main/java/listnode/selftry/mergeTwoLists.java b/Leecode/src/main/java/listnode/selftry/mergeTwoLists.java new file mode 100644 index 0000000..f8fcfaa --- /dev/null +++ b/Leecode/src/main/java/listnode/selftry/mergeTwoLists.java @@ -0,0 +1,82 @@ +package listnode.selftry; + +import listnode.addTwoNumbers; +import listnode.removeNthFromEnd; + +public class mergeTwoLists { + + public static void main(String[] args) { + + ListNode l1 = new ListNode(); +// l1.next=new ListNode(2); +// l1.next.next=new ListNode(4); + + + ListNode l2 = new ListNode(0); +// l2.next = new ListNode(2); +// l2.next = new ListNode(3); +// l2.next.next =new ListNode(4); + + ListNode listNode = mergeTwoLists(l1, l2); + + } + + public static ListNode mergeTwoLists(ListNode list1, ListNode list2) { + if(list1==null){ + return list2; + } + if(list2==null){ + return list1; + } + ListNode head=new ListNode(); + ListNode dust=new ListNode(0,head); + + while (list1!=null&&list2!=null){ + + if(list1.val integers = inorderTraversal1(root); + + System.out.println(integers); + + + } + + + public static void deleteNode(TreeNode root,int value){ + + //删除的是有左右两个子树的节点 + TreeNode p =root; + //记录当前节点的父节点 + TreeNode pp = null; + + //寻找到要删除的节点和他的父节点 + while(p != null && p.val !=value){ + pp=p; + if(p.val < value){ + p=p.right; + }else if(p.val>value){ + p=p.left; + } + } + + //判断是根据那个条件出来的 + if(p == null){ + System.out.println("未找到要删除的节点的值..."); + return; + }else if(p.val == value){ + + //p是要删除的节点,pp是他的父节点,如果pp=null,删除的就是root + + //判断删除的节点有几个子树 + if (p.left !=null &&p.right !=null){ + //左右子树都有,将找到右子树最小的节点,将他的值付给p,然后变成删除这个最小的数 + TreeNode min=p.right; + //记录他的父节点 + TreeNode flag=p; + while (min.left !=null){ + flag=min; + min=min.left; + } + p.val=min.val; + p=min; + pp=flag; + + } + + //现在要删除的节点最多只有一个子树 + TreeNode child =null; + if(p.left !=null){ + child=p.left; + }else if (p.right !=null){ + child=p.right; + } + + if(pp ==null){ + //要删除的是根节点 + root=child; + }else if(pp.left == p)pp.left=child; + else pp.right=child; + + } + + + + } + + + + + +} diff --git a/Leecode/src/main/java/tree/InorderTraversal.java b/Leecode/src/main/java/tree/InorderTraversal.java new file mode 100644 index 0000000..5785642 --- /dev/null +++ b/Leecode/src/main/java/tree/InorderTraversal.java @@ -0,0 +1,133 @@ +package tree; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +public class InorderTraversal { + + public static void main(String[] args) { + + TreeNode root = new TreeNode(4); + TreeNode TreeNode2 = new TreeNode(2); + TreeNode TreeNode3 = new TreeNode(6); + TreeNode TreeNode4 = new TreeNode(1); + TreeNode TreeNode5 = new TreeNode(3); + TreeNode TreeNode6 = new TreeNode(5); + + root.setLeft(TreeNode2); + root.setRight(TreeNode3); + TreeNode2.setLeft(TreeNode4); + TreeNode2.setRight(TreeNode5); + TreeNode3.setLeft(TreeNode6); + + List integers = inorderTraversal1(root); + + System.out.println(integers); + + + + } + + public static List list =new ArrayList(); + public static List list2 =new ArrayList(); + + + /** + * 递归法:中序遍历 + * @param root + */ + public static void inorderTraversal(TreeNode root){ + + if(root == null){ + return; + } + if(root.left !=null){ + inorderTraversal(root.left); + + } + list.add(root); + + if(root.right !=null){ + inorderTraversal(root.right); + } + + } + + /** + * 递归法原题:中序遍历 => O(n) + * @param root + */ + public static List inorderTraversal2(TreeNode root){ + + if(root == null){ + return null; + } + if(root.left !=null){ + inorderTraversal2(root.left); + + } + list2.add(root.val); + + if(root.right !=null){ + inorderTraversal2(root.right); + } + return list2; + + } + + /** + * 非递归法:中序遍历(题解第三种方法) ->空间复杂度 O(1)Morris 中序遍历 + * 循环: + * 寻找当前节点的左子树: + * 如果左子树为空:将当前节点加入list,将当前节点右移 + * 如果不为空: + * 寻找当前节点的左子树最右节点flag,判断flag的右子节点是否为空: + * 如果为空:当前节点左移,设置flag的右子节点为当前节点 + * 如果不为空:说明已经遍历完当前节点的左子树,将flag的右子节点为置空,将当前节点加入list,当前节点右移 + * @param root + */ + public static List inorderTraversal1(TreeNode root){ + + List list1 =new ArrayList(); + + while (root != null){ + if(root.left ==null){ + //如果左子树为空 + list1.add(root.val); + root=root.right; + }else { + //如果左子树不为空: + + //记录左子树最右节点 + TreeNode p=root.left; + //寻找flag + while (p.right !=null &&p.right != root){ + p=p.right; + } + TreeNode flag=p; + + //判断flag是根据什么条件出来的,是flag.right ==null还是p.right != root + if(flag.right == null){ + //flag无右子节点,第一次遍历 + flag.right =root; + root=root.left; + }else if(flag.right == root){ + //flag已经被加载过了,即当前节点的左子树已经被遍历完了 + flag.right =null; + list1.add(root.val); + root=root.right; + } + } + + } + + + + + return list1; + } + + +} diff --git a/Leecode/src/main/java/tree/TreeNode.java b/Leecode/src/main/java/tree/TreeNode.java new file mode 100644 index 0000000..a216ba2 --- /dev/null +++ b/Leecode/src/main/java/tree/TreeNode.java @@ -0,0 +1,34 @@ +package tree; + +import lombok.Data; + +@Data +public class TreeNode { + + int val; + TreeNode left; + TreeNode right; + + TreeNode() { + } + + TreeNode(int val) { + this.val = val; + } + + TreeNode(int val, TreeNode left, TreeNode right) { + this.val = val; + this.left = left; + this.right = right; + } + + @Override + public String toString() { + return "TreeNode{" + + "val=" + val + + ", left=" + left + + ", right=" + right + + '}'; + } + +} diff --git a/guli_parent/.gitignore b/guli_parent/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/guli_parent/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/guli_parent/.mvn/wrapper/maven-wrapper.jar b/guli_parent/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..c1dd12f Binary files /dev/null and b/guli_parent/.mvn/wrapper/maven-wrapper.jar differ diff --git a/guli_parent/.mvn/wrapper/maven-wrapper.properties b/guli_parent/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..b7cb93e --- /dev/null +++ b/guli_parent/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar diff --git a/guli_parent/common/common_utils/pom.xml b/guli_parent/common/common_utils/pom.xml new file mode 100644 index 0000000..9c705f8 --- /dev/null +++ b/guli_parent/common/common_utils/pom.xml @@ -0,0 +1,15 @@ + + + + common + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + common_utils + + + \ No newline at end of file diff --git a/guli_parent/common/common_utils/src/main/java/com/atguigu/commonutils/R.java b/guli_parent/common/common_utils/src/main/java/com/atguigu/commonutils/R.java new file mode 100644 index 0000000..acf0dc4 --- /dev/null +++ b/guli_parent/common/common_utils/src/main/java/com/atguigu/commonutils/R.java @@ -0,0 +1,85 @@ +package com.atguigu.commonutils; + + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +//TODO 同一结果返回类 +/* +返回结果类型: +{ +"success": 布尔, //响应是否成功 +"code": 数字, //响应码 +"message": 字符串, //返回消息 +"data": HashMap //返回数据,放在键值对中 +} + +*/ +@Data +public class R { + + @ApiModelProperty(value = "是否成功") + private Boolean success; + @ApiModelProperty(value = "返回码") + private Integer code; + @ApiModelProperty(value = "返回消息") + private String message; + @ApiModelProperty(value = "返回数据") + private Map data = new HashMap(); + + + //构造方法私有 + private R() { + } + + //成功静态方法 + public static R ok() { + R r = new R(); + r.setSuccess(true); + r.setCode(ResultCode.SUCCESS); + r.setMessage("成功"); + + return r; + } + + + //失败静态方法 + public static R error() { + R r = new R(); + r.setSuccess(false); + r.setCode(ResultCode.ERROR); + r.setMessage("失败"); + + return r; + } + + public R success(Boolean success) { + this.setSuccess(success); + return this; + } + + public R message(String message) { + this.setMessage(message); + return this; + } + + public R code(Integer code) { + this.setCode(code); + return this; + } + + public R data(String key, Object value) { + this.data.put(key, value); + return this; + } + + public R data(Map map) { + this.setData(map); + return this; + } +} + + diff --git a/guli_parent/common/common_utils/src/main/java/com/atguigu/commonutils/ResultCode.java b/guli_parent/common/common_utils/src/main/java/com/atguigu/commonutils/ResultCode.java new file mode 100644 index 0000000..e2f94db --- /dev/null +++ b/guli_parent/common/common_utils/src/main/java/com/atguigu/commonutils/ResultCode.java @@ -0,0 +1,15 @@ +package com.atguigu.commonutils; + + +import org.omg.CORBA.PUBLIC_MEMBER; +import org.omg.PortableInterceptor.Interceptor; + +//TODO 定义返回的状态码信息 +public interface ResultCode { + + public static Integer SUCCESS=20000; //操作成功 + public static Integer ERROR=20001; //操作失败 + + + +} diff --git a/guli_parent/common/pom.xml b/guli_parent/common/pom.xml new file mode 100644 index 0000000..d205ff7 --- /dev/null +++ b/guli_parent/common/pom.xml @@ -0,0 +1,62 @@ + + + + guli_parent + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + common + pom + + service_base + common_utils + + + + + org.springframework.boot + spring-boot-starter-web + provided + + + + com.baomidou + mybatis-plus-boot-starter + provided + + + + org.projectlombok + lombok + provided + + + + io.springfox + springfox-swagger2 + provided + + + io.springfox + springfox-swagger-ui + provided + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + + + + + + + \ No newline at end of file diff --git a/guli_parent/common/service_base/pom.xml b/guli_parent/common/service_base/pom.xml new file mode 100644 index 0000000..3a75206 --- /dev/null +++ b/guli_parent/common/service_base/pom.xml @@ -0,0 +1,24 @@ + + + + common + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + service_base + + + + + com.atguigu + common_utils + 0.0.1-SNAPSHOT + + + + + \ No newline at end of file diff --git a/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/SwaggerConfig.java b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/SwaggerConfig.java new file mode 100644 index 0000000..05f8a18 --- /dev/null +++ b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/SwaggerConfig.java @@ -0,0 +1,42 @@ +package com.atguigu.servicebase; + + +import com.google.common.base.Predicates; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.Contact; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@Configuration //配置类 +@EnableSwagger2 //swagger注解 +public class SwaggerConfig { + + @Bean //配置swagger插件 + public Docket webApiConfig(){ + return new Docket(DocumentationType.SWAGGER_2) + .groupName("webApi") + .apiInfo(webApiInfo()) + .select() + .paths(Predicates.not(PathSelectors.regex("/admin/.*"))) + .paths(Predicates.not(PathSelectors.regex("/error.*"))) + .build(); + } + + private ApiInfo webApiInfo(){ + return new ApiInfoBuilder() + .title("网站-课程中心API文档") + .description("本文档描述了课程中心微服务接口定义") + .version("1.0") + .contact(new Contact("Ding", "http://atguigu.com", + "55317332@qq.com")) + .build(); + } + + + +} diff --git a/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GlobalExceptionHandler.java b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GlobalExceptionHandler.java new file mode 100644 index 0000000..7ffa61c --- /dev/null +++ b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GlobalExceptionHandler.java @@ -0,0 +1,51 @@ +package com.atguigu.servicebase.exceptionhandler; + + +import com.atguigu.commonutils.R; +import com.atguigu.servicebase.utils.ExceptionUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.ResponseBody; + + +//统一异常处理 +@ControllerAdvice +@Slf4j //使得错误输出可以写到文件中去 +public class GlobalExceptionHandler { + + + //指定出现了什么异常执行这个方法 + @ExceptionHandler(Exception.class) + @ResponseBody //为了能够返回数据 + public R error(Exception e){ + e.printStackTrace(); + return R.error().message("执行了全局异常处理"); + + } + + //特定异常 + @ExceptionHandler(ArithmeticException.class) + @ResponseBody //为了能够返回数据 + public R error(ArithmeticException e){ + e.printStackTrace(); + return R.error().message("执行了ArithmeticException异常处理"); + + } + + //自定义异常处理 ,但是这种方式没办法自动抛出,需要手动抛出 + @ExceptionHandler(GuliException.class) + @ResponseBody //为了能够返回数据 + public R error(GuliException e){ + //将异常信息输出到文件中去 + log.error(ExceptionUtil.getMessage(e)); + + e.printStackTrace(); + return R.error().code(e.getCode()).message(e.getMsg()); + + } + + + +} diff --git a/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GuliException.java b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GuliException.java new file mode 100644 index 0000000..337761d --- /dev/null +++ b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/exceptionhandler/GuliException.java @@ -0,0 +1,18 @@ +package com.atguigu.servicebase.exceptionhandler; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class GuliException extends RuntimeException { + + private Integer code;//状态码 + + private String msg; //异常信息 + + + +} diff --git a/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/handler/MyMetaObjectHandler.java b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/handler/MyMetaObjectHandler.java new file mode 100644 index 0000000..f0bebed --- /dev/null +++ b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/handler/MyMetaObjectHandler.java @@ -0,0 +1,26 @@ +package com.atguigu.servicebase.handler; + +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; + +import java.util.Date; + + +/** + * 默认填充类:设置添加和修改的时候的方法 + */ +@Component +public class MyMetaObjectHandler implements MetaObjectHandler { + @Override + public void insertFill(MetaObject metaObject) { + //传的是属性名称,不是字段名称 + this.setFieldValByName("gmtCreate",new Date(),metaObject); + this.setFieldValByName("gmtModified",new Date(),metaObject); + } + + @Override + public void updateFill(MetaObject metaObject) { + this.setFieldValByName("gmtModified",new Date(),metaObject); + } +} diff --git a/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/utils/ExceptionUtil.java b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/utils/ExceptionUtil.java new file mode 100644 index 0000000..cd158fb --- /dev/null +++ b/guli_parent/common/service_base/src/main/java/com/atguigu/servicebase/utils/ExceptionUtil.java @@ -0,0 +1,33 @@ +package com.atguigu.servicebase.utils; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; + +public class ExceptionUtil { + + public static String getMessage(Exception e) { + StringWriter sw = null; + PrintWriter pw = null; + try { + sw = new StringWriter(); + pw = new PrintWriter(sw); + // 将出错的栈信息输出到printWriter中 + e.printStackTrace(pw); + pw.flush(); + sw.flush(); + } finally { + if (sw != null) { + try { + sw.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + if (pw != null) { + pw.close(); + } + } + return sw.toString(); + } +} diff --git a/guli_parent/mvnw b/guli_parent/mvnw new file mode 100644 index 0000000..8a8fb22 --- /dev/null +++ b/guli_parent/mvnw @@ -0,0 +1,316 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/guli_parent/mvnw.cmd b/guli_parent/mvnw.cmd new file mode 100644 index 0000000..1d8ab01 --- /dev/null +++ b/guli_parent/mvnw.cmd @@ -0,0 +1,188 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/guli_parent/pom.xml b/guli_parent/pom.xml new file mode 100644 index 0000000..10a03b7 --- /dev/null +++ b/guli_parent/pom.xml @@ -0,0 +1,204 @@ + + + 4.0.0 + + + service + common + + + + org.springframework.boot + spring-boot-starter-parent + 2.2.1.RELEASE + + + com.atguigu + guli_parent + pom + 0.0.1-SNAPSHOT + guli_parent + Demo project for Spring Boot + + + 1.8 + 0.0.1-SNAPSHOT + 3.0.5 + 2.0 + 2.7.0 + 2.8.3 + 2.10.1 + 3.17 + 1.3.1 + 2.6 + 4.5.1 + 0.7.0 + 4.3.3 + 3.1.0 + 2.15.2 + 1.4.11 + 1.4.11 + 1.2.28 + 2.8.2 + 20170516 + 1.7 + 1.1.0 + zx + 0.2.2.RELEASE + + + + + + + org.springframework.cloud + spring-cloud-dependencies + Hoxton.RELEASE + pom + import + + + org.springframework.cloud + spring-cloud-alibaba-dependencies + ${cloud-alibaba.version} + pom + import + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus.version} + + + + org.apache.velocity + velocity-engine-core + ${velocity.version} + + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + com.aliyun.oss + aliyun-sdk-oss + ${aliyun.oss.version} + + + + joda-time + joda-time + ${jodatime.version} + + + + org.apache.poi + poi + ${poi.version} + + + + org.apache.poi + poi-ooxml + ${poi.version} + + + + commons-fileupload + commons-fileupload + ${commons-fileupload.version} + + + + commons-io + commons-io + ${commons-io.version} + + + + org.apache.httpcomponents + httpclient + ${httpclient.version} + + + com.google.code.gson + gson + ${gson.version} + + + + io.jsonwebtoken + jjwt + ${jwt.version} + + + + com.aliyun + aliyun-java-sdk-core + ${aliyun-java-sdk-core.version} + + + com.aliyun.oss + aliyun-sdk-oss + ${aliyun-sdk-oss.version} + + + com.aliyun + aliyun-java-sdk-vod + ${aliyun-java-sdk-vod.version} + + + com.aliyun + aliyun-java-vod-upload + ${aliyun-java-vod-upload.version} + + + com.aliyun + aliyun-sdk-vod-upload + ${aliyun-sdk-vod-upload.version} + + + com.alibaba + fastjson + ${fastjson.version} + + + org.json + json + ${json.version} + + + commons-dbutils + commons-dbutils + ${commons-dbutils.version} + + + com.alibaba.otter + canal.client + ${canal.client.version} + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/guli_parent/service/pom.xml b/guli_parent/service/pom.xml new file mode 100644 index 0000000..f7ccdb1 --- /dev/null +++ b/guli_parent/service/pom.xml @@ -0,0 +1,141 @@ + + + + guli_parent + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + service + pom + + service_edu + service_oss + service_vod + + + + + + + + + + + + + + + + + + + + + + + + + + + com.atguigu + service_base + 0.0.1-SNAPSHOT + + + + + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + + com.baomidou + mybatis-plus-boot-starter + + + + mysql + mysql-connector-java + + + + + org.apache.velocity + velocity-engine-core + + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-swagger-ui + + + + org.projectlombok + lombok + + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + + commons-fileupload + commons-fileupload + + + + org.apache.httpcomponents + httpclient + + + + commons-io + commons-io + + + + com.google.code.gson + gson + + + junit + junit + 4.12 + + + + + + + + + src/main/java + + **/*.xml + + false + + + + + \ No newline at end of file diff --git a/guli_parent/service/service_edu/edu/error/log-error-2022-04-21.0.log b/guli_parent/service/service_edu/edu/error/log-error-2022-04-21.0.log new file mode 100644 index 0000000..6fdf48c --- /dev/null +++ b/guli_parent/service/service_edu/edu/error/log-error-2022-04-21.0.log @@ -0,0 +1 @@ +2022-04-21 21:01:02.160 [http-nio-8001-exec-7] ERROR c.a.s.exceptionhandler.GlobalExceptionHandler - null diff --git a/guli_parent/service/service_edu/edu/info/log-info-2022-04-21.0.log b/guli_parent/service/service_edu/edu/info/log-info-2022-04-21.0.log new file mode 100644 index 0000000..fde37ef --- /dev/null +++ b/guli_parent/service/service_edu/edu/info/log-info-2022-04-21.0.log @@ -0,0 +1,47 @@ +2022-04-21 20:57:35.548 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 5196 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-21 20:57:35.553 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-21 20:57:36.508 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-21 20:57:36.510 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-21 20:57:36.533 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 7ms. Found 0 repository interfaces. +2022-04-21 20:57:36.764 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-21 20:57:36.938 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-21 20:57:36.943 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-21 20:57:36.943 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-21 20:57:36.944 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-21 20:57:37.019 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-21 20:57:37.019 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1353 ms +2022-04-21 20:57:37.161 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-21 20:57:37.324 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-21 20:57:37.654 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-21 20:57:37.727 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-21 20:57:38.052 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-21 20:57:38.061 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-21 20:57:38.081 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-21 20:57:38.219 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-21 20:57:38.233 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-21 20:57:38.237 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 3.206 seconds (JVM running for 3.756) +2022-04-21 21:00:50.190 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13652 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-21 21:00:50.199 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-21 21:00:52.508 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-21 21:00:52.516 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-21 21:00:52.568 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 20ms. Found 0 repository interfaces. +2022-04-21 21:00:53.129 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-21 21:00:53.618 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-21 21:00:53.629 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-21 21:00:53.630 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-21 21:00:53.630 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-21 21:00:53.729 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-21 21:00:53.730 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3274 ms +2022-04-21 21:00:54.055 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-21 21:00:54.422 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-21 21:00:56.417 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-21 21:00:56.889 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-21 21:00:57.741 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-21 21:00:57.754 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-21 21:00:57.793 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-21 21:00:58.213 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-21 21:00:58.241 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-21 21:00:58.252 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.336 seconds (JVM running for 10.483) +2022-04-21 21:00:58.352 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-21 21:00:58.353 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-21 21:00:58.359 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 6 ms diff --git a/guli_parent/service/service_edu/edu/info/log-info-2022-04-22.0.log b/guli_parent/service/service_edu/edu/info/log-info-2022-04-22.0.log new file mode 100644 index 0000000..946dacb --- /dev/null +++ b/guli_parent/service/service_edu/edu/info/log-info-2022-04-22.0.log @@ -0,0 +1,200 @@ +2022-04-22 16:11:06.739 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 20396 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 16:11:06.837 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 16:11:13.525 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 16:11:13.537 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 16:11:13.685 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 58ms. Found 0 repository interfaces. +2022-04-22 16:11:15.522 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 16:11:16.719 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 16:11:16.754 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 16:11:16.756 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 16:11:16.757 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 16:11:17.087 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 16:11:17.087 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 9841 ms +2022-04-22 16:11:17.840 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 16:11:18.575 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 16:11:21.470 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 16:11:22.045 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 16:11:25.314 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 16:11:25.428 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 16:11:25.719 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 16:11:27.234 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 16:11:27.362 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 16:11:27.381 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 24.506 seconds (JVM running for 29.474) +2022-04-22 16:14:26.591 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 16:14:26.593 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 16:14:26.628 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 34 ms +2022-04-22 16:22:20.475 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 8784 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 16:22:20.550 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 16:22:27.173 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 16:22:27.206 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 16:22:27.436 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 121ms. Found 0 repository interfaces. +2022-04-22 16:22:28.692 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 16:22:29.427 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 16:22:29.459 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 16:22:29.462 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 16:22:29.465 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 16:22:29.780 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 16:22:29.780 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 8769 ms +2022-04-22 16:22:30.430 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 16:22:30.973 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 16:22:32.463 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 16:22:32.862 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 16:22:34.567 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 16:22:34.633 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 16:22:34.741 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 16:22:35.434 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 16:22:35.515 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 16:22:35.523 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 18.867 seconds (JVM running for 24.372) +2022-04-22 16:22:41.283 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 16:22:41.284 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 16:22:41.308 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 24 ms +2022-04-22 17:22:51.944 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 15372 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 17:22:51.974 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 17:22:58.495 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 17:22:58.520 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 17:22:58.628 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 35ms. Found 0 repository interfaces. +2022-04-22 17:22:59.987 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 17:23:01.087 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 17:23:01.145 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 17:23:01.153 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 17:23:01.157 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 17:23:01.519 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 17:23:01.520 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 9275 ms +2022-04-22 17:23:02.694 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 17:23:03.530 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 17:23:06.183 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 17:23:06.582 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 17:23:08.306 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 17:23:08.379 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 17:23:08.504 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 17:23:09.102 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 17:23:09.216 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 17:23:09.229 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 21.399 seconds (JVM running for 29.843) +2022-04-22 17:23:20.928 [http-nio-8001-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 17:23:20.932 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 17:23:20.957 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 22 ms +2022-04-22 19:50:55.720 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 17936 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 19:50:55.766 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 19:51:01.696 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 19:51:01.708 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 19:51:01.795 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 28ms. Found 0 repository interfaces. +2022-04-22 19:51:03.105 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 19:51:04.347 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 19:51:04.396 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 19:51:04.399 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 19:51:04.400 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 19:51:04.731 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 19:51:04.732 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 8476 ms +2022-04-22 19:51:05.201 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 19:51:05.761 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 19:51:08.772 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 19:51:09.359 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 19:51:12.004 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 19:51:12.098 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 19:51:12.325 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 19:51:13.449 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 19:51:13.553 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 19:51:13.572 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 20.848 seconds (JVM running for 25.253) +2022-04-22 19:51:45.842 [http-nio-8001-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 19:51:45.844 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 19:51:45.870 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 26 ms +2022-04-22 21:02:14.650 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 19980 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 21:02:14.668 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 21:02:21.283 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 21:02:21.294 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 21:02:21.516 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 105ms. Found 0 repository interfaces. +2022-04-22 21:02:23.671 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 21:02:25.184 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 21:02:25.241 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 21:02:25.245 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 21:02:25.245 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 21:02:25.610 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 21:02:25.611 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 10704 ms +2022-04-22 21:02:26.969 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 21:02:27.766 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 21:02:30.335 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 21:02:30.884 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 21:02:32.685 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 21:02:32.733 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 21:02:32.879 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 21:02:33.548 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 21:02:33.611 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 21:02:33.618 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 21.724 seconds (JVM running for 26.735) +2022-04-22 21:03:27.873 [http-nio-8001-exec-3] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 21:03:27.878 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 21:03:27.894 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 15 ms +2022-04-22 21:09:29.287 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 11768 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 21:09:29.295 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 21:09:35.789 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 21:09:35.801 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 21:09:35.863 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 18ms. Found 0 repository interfaces. +2022-04-22 21:09:36.783 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 21:09:37.727 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 21:09:37.750 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 21:09:37.751 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 21:09:37.752 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 21:09:37.997 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 21:09:37.997 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 8441 ms +2022-04-22 21:09:38.591 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 21:09:39.120 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 21:09:40.639 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 21:09:41.132 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 21:09:42.654 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 21:09:42.715 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 21:09:42.840 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 21:09:43.505 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 21:09:43.575 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 21:09:43.588 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 16.638 seconds (JVM running for 19.034) +2022-04-22 21:09:52.962 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 21:09:52.965 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 21:09:52.998 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 31 ms +2022-04-22 21:28:43.865 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 7476 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 21:28:43.878 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 21:28:47.458 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 21:28:47.469 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 21:28:47.569 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 35ms. Found 0 repository interfaces. +2022-04-22 21:28:48.765 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 21:28:49.714 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 21:28:49.754 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 21:28:49.758 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 21:28:49.759 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 21:28:49.990 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 21:28:49.996 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5798 ms +2022-04-22 21:28:50.621 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 21:28:51.164 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 21:28:52.918 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 21:28:53.533 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 21:28:55.146 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 21:28:55.204 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 21:28:55.335 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 21:28:55.994 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 21:28:56.069 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 21:28:56.097 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 14.049 seconds (JVM running for 16.394) +2022-04-22 21:29:35.486 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 21:29:35.487 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 21:29:35.567 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 79 ms +2022-04-22 21:32:40.555 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 4320 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-22 21:32:40.563 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-22 21:32:44.431 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-22 21:32:44.447 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-22 21:32:44.596 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 39ms. Found 0 repository interfaces. +2022-04-22 21:32:45.933 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-22 21:32:47.021 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-22 21:32:47.040 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-22 21:32:47.044 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-22 21:32:47.047 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-22 21:32:47.328 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-22 21:32:47.329 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 6500 ms +2022-04-22 21:32:48.019 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-22 21:32:48.994 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-22 21:32:50.604 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-22 21:32:50.959 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-22 21:32:52.480 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-22 21:32:52.547 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-22 21:32:52.687 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-22 21:32:53.849 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-22 21:32:54.051 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-22 21:32:54.069 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 15.9 seconds (JVM running for 18.414) +2022-04-22 21:32:54.397 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-22 21:32:54.398 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-22 21:32:54.494 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 94 ms diff --git a/guli_parent/service/service_edu/edu/info/log-info-2022-04-24.0.log b/guli_parent/service/service_edu/edu/info/log-info-2022-04-24.0.log new file mode 100644 index 0000000..8a7979b --- /dev/null +++ b/guli_parent/service/service_edu/edu/info/log-info-2022-04-24.0.log @@ -0,0 +1,444 @@ +2022-04-24 11:11:43.893 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 20472 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 11:11:43.920 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 11:11:50.817 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 11:11:50.831 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 11:11:50.983 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 40ms. Found 0 repository interfaces. +2022-04-24 11:11:52.407 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 11:11:53.612 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 11:11:53.654 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 11:11:53.658 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 11:11:53.661 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 11:11:54.226 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 11:11:54.227 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 9958 ms +2022-04-24 11:11:55.334 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 11:11:56.295 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 11:11:58.593 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 11:11:59.244 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 11:12:01.643 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 11:12:01.717 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 11:12:01.958 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 11:12:02.955 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 11:12:03.046 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 11:12:03.059 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 23.702 seconds (JVM running for 28.285) +2022-04-24 11:12:14.122 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 11:12:14.128 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 11:12:14.162 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 32 ms +2022-04-24 15:09:04.077 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 1292 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 15:09:04.097 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 15:09:06.194 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 15:09:06.202 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 15:09:06.245 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 25ms. Found 0 repository interfaces. +2022-04-24 15:09:07.347 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 15:09:07.937 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 15:09:07.951 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 15:09:07.956 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 15:09:07.958 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 15:09:08.100 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 15:09:08.103 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3697 ms +2022-04-24 15:09:08.402 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 15:09:08.844 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 15:09:09.960 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 15:09:10.481 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 15:09:12.056 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 15:09:12.134 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 15:09:12.412 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 15:09:13.680 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 15:09:13.804 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 15:09:13.820 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 11.145 seconds (JVM running for 12.285) +2022-04-24 15:10:39.846 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 15:10:39.846 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 15:10:39.857 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 11 ms +2022-04-24 17:40:58.128 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 10652 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 17:40:58.166 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 17:41:01.970 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 17:41:01.984 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 17:41:02.074 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 49ms. Found 0 repository interfaces. +2022-04-24 17:41:02.950 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 17:41:03.407 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 17:41:03.414 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 17:41:03.415 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 17:41:03.415 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 17:41:03.556 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 17:41:03.557 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4739 ms +2022-04-24 17:41:03.879 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 17:41:04.161 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 17:41:05.031 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 17:41:05.209 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 17:41:06.066 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 17:41:06.087 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 17:41:06.153 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 17:41:06.622 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 17:41:06.674 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 17:41:06.676 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 11.775 seconds (JVM running for 14.112) +2022-04-24 17:42:36.246 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 17:42:36.246 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 17:42:36.250 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 4 ms +2022-04-24 18:14:30.676 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13252 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 18:14:30.709 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 18:14:32.764 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 18:14:32.767 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 18:14:32.784 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 8ms. Found 0 repository interfaces. +2022-04-24 18:14:33.006 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 18:14:33.169 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 18:14:33.175 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 18:14:33.176 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 18:14:33.176 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 18:14:33.236 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 18:14:33.236 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2205 ms +2022-04-24 18:14:33.355 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 18:14:33.468 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 18:14:33.795 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 18:14:33.862 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 18:14:34.160 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 18:14:34.170 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 18:14:34.205 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 18:14:34.329 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 18:14:34.343 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 18:14:34.345 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 5.978 seconds (JVM running for 7.868) +2022-04-24 18:15:10.211 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 18:15:10.214 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 18:15:10.257 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 42 ms +2022-04-24 18:16:23.862 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 10992 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 18:16:23.881 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 18:16:26.215 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 18:16:26.218 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 18:16:26.284 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 25ms. Found 0 repository interfaces. +2022-04-24 18:16:26.749 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 18:16:27.155 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 18:16:27.161 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 18:16:27.162 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 18:16:27.162 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 18:16:27.320 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 18:16:27.322 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3293 ms +2022-04-24 18:16:27.749 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 18:16:27.987 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 18:16:28.807 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 18:16:28.973 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 18:16:29.757 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 18:16:29.799 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 18:16:29.863 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 18:16:30.225 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 18:16:30.281 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 18:16:30.283 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.212 seconds (JVM running for 9.61) +2022-04-24 18:17:04.765 [http-nio-8001-exec-3] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 18:17:04.766 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 18:17:04.814 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 46 ms +2022-04-24 18:19:36.859 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 7632 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 18:19:36.877 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 18:19:39.709 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 18:19:39.723 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 18:19:39.802 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 35ms. Found 0 repository interfaces. +2022-04-24 18:19:40.476 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 18:19:40.898 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 18:19:40.927 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 18:19:40.928 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 18:19:40.928 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 18:19:41.065 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 18:19:41.065 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3906 ms +2022-04-24 18:19:41.442 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 18:19:41.746 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 18:19:42.663 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 18:19:42.865 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 18:19:43.711 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 18:19:43.741 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 18:19:43.802 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 18:19:44.249 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 18:19:44.286 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 18:19:44.293 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.147 seconds (JVM running for 11.554) +2022-04-24 18:21:11.262 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 18:21:11.263 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 18:21:11.285 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 22 ms +2022-04-24 18:23:32.309 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 12460 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 18:23:32.312 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 18:23:33.221 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 18:23:33.224 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 18:23:33.254 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 12ms. Found 0 repository interfaces. +2022-04-24 18:23:33.479 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 18:23:33.638 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 18:23:33.646 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 18:23:33.646 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 18:23:33.647 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 18:23:33.709 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 18:23:33.709 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1298 ms +2022-04-24 18:23:33.835 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 18:23:33.963 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 18:23:34.291 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 18:23:34.362 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 18:23:34.654 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 18:23:34.664 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 18:23:34.688 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 18:23:34.809 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 18:23:34.823 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 18:23:34.825 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 2.928 seconds (JVM running for 3.386) +2022-04-24 18:24:23.672 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 19008 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 18:24:23.675 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 18:24:24.343 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 18:24:24.345 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 18:24:24.361 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 6ms. Found 0 repository interfaces. +2022-04-24 18:24:24.545 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 18:24:24.702 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 18:24:24.708 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 18:24:24.708 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 18:24:24.708 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 18:24:24.769 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 18:24:24.769 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1039 ms +2022-04-24 18:24:24.897 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 18:24:25.007 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 18:24:25.348 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 18:24:25.422 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 18:24:25.726 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 18:24:25.737 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 18:24:25.760 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 18:24:25.894 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 18:24:25.950 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 18:24:25.953 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 2.791 seconds (JVM running for 3.527) +2022-04-24 18:24:41.094 [http-nio-8001-exec-3] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 18:24:41.095 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 18:24:41.101 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 6 ms +2022-04-24 18:31:38.469 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 8608 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 18:31:38.480 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 18:31:41.826 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 18:31:41.837 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 18:31:41.923 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 37ms. Found 0 repository interfaces. +2022-04-24 18:31:42.902 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 18:31:43.572 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 18:31:43.598 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 18:31:43.601 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 18:31:43.602 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 18:31:43.877 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 18:31:43.878 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4958 ms +2022-04-24 18:31:44.470 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 18:31:45.124 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 18:31:46.753 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 18:31:47.141 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 18:31:48.402 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 18:31:48.449 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 18:31:48.544 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 18:31:49.112 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 18:31:49.213 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 18:31:49.225 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 15.499 seconds (JVM running for 20.352) +2022-04-24 18:32:30.533 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 18:32:30.538 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 18:32:30.574 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 33 ms +2022-04-24 19:38:00.372 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 4264 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 19:38:00.395 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 19:38:04.068 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 19:38:04.068 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 19:38:04.183 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 40ms. Found 0 repository interfaces. +2022-04-24 19:38:04.841 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 19:38:05.528 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 19:38:05.538 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 19:38:05.538 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 19:38:05.538 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 19:38:05.829 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 19:38:05.829 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5091 ms +2022-04-24 19:38:06.468 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 19:38:06.958 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 19:38:08.048 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 19:38:08.318 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 19:38:09.478 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 19:38:09.498 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 19:38:09.578 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 19:38:10.008 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 19:38:10.057 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 19:38:10.057 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 12.742 seconds (JVM running for 16.533) +2022-04-24 19:40:17.457 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 16024 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 19:40:17.457 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 19:40:18.292 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 19:40:18.292 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 19:40:18.312 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 8ms. Found 0 repository interfaces. +2022-04-24 19:40:18.587 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 19:40:18.757 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 19:40:18.762 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 19:40:18.767 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 19:40:18.767 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 19:40:18.827 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 19:40:18.827 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1289 ms +2022-04-24 19:40:18.977 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 19:40:19.107 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 19:40:19.457 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 19:40:19.532 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 19:40:19.857 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 19:40:19.865 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 19:40:19.887 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 19:40:20.007 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 19:40:20.033 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 19:40:20.036 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 3.004 seconds (JVM running for 3.605) +2022-04-24 19:40:45.866 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 19:40:45.867 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 19:40:45.873 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 6 ms +2022-04-24 20:28:10.446 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 15048 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:28:10.478 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:28:16.933 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:28:16.947 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:28:17.087 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 57ms. Found 0 repository interfaces. +2022-04-24 20:28:18.713 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:28:19.982 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:28:20.068 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:28:20.072 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:28:20.078 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:28:20.472 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:28:20.473 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 9651 ms +2022-04-24 20:28:21.337 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:28:21.989 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:28:24.298 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:28:24.796 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:28:26.741 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:28:26.803 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:28:26.962 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:28:28.119 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:28:28.230 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:28:28.255 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 22.08 seconds (JVM running for 25.494) +2022-04-24 20:28:46.660 [http-nio-8001-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:28:46.661 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:28:46.668 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 7 ms +2022-04-24 20:29:32.313 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 1788 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:29:32.340 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:29:34.862 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:29:34.864 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:29:34.916 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 34ms. Found 0 repository interfaces. +2022-04-24 20:29:35.537 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:29:35.922 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:29:35.936 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:29:35.936 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:29:35.937 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:29:36.079 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:29:36.081 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3334 ms +2022-04-24 20:29:36.545 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:29:36.909 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:29:37.830 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:29:38.165 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:29:39.286 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:29:39.315 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:29:39.370 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:29:39.654 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:29:39.691 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:29:39.703 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.074 seconds (JVM running for 10.721) +2022-04-24 20:29:55.430 [http-nio-8001-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:29:55.431 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:29:55.459 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 25 ms +2022-04-24 20:31:08.056 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 1728 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:31:08.074 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:31:11.555 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:31:11.563 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:31:11.630 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces. +2022-04-24 20:31:12.355 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:31:12.753 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:31:12.764 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:31:12.767 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:31:12.769 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:31:12.897 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:31:12.899 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4535 ms +2022-04-24 20:31:13.263 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:31:13.518 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:31:14.332 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:31:14.491 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:31:15.223 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:31:15.265 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:31:15.300 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:31:15.611 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:31:15.628 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:31:15.639 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.283 seconds (JVM running for 11.25) +2022-04-24 20:31:27.575 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:31:27.576 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:31:27.601 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 25 ms +2022-04-24 20:32:33.005 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13060 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:32:33.123 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:32:35.259 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:32:35.261 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:32:35.319 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 48ms. Found 0 repository interfaces. +2022-04-24 20:32:35.920 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:32:36.295 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:32:36.316 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:32:36.317 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:32:36.317 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:32:36.450 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:32:36.450 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3175 ms +2022-04-24 20:32:36.871 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:32:37.200 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:32:38.069 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:32:38.262 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:32:39.053 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:32:39.071 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:32:39.140 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:32:39.537 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:32:39.592 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:32:39.604 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.293 seconds (JVM running for 9.959) +2022-04-24 20:32:44.459 [http-nio-8001-exec-3] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:32:44.463 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:32:44.495 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 30 ms +2022-04-24 20:33:57.452 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 15836 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:33:57.618 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:34:00.419 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:34:00.441 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:34:00.585 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 46ms. Found 0 repository interfaces. +2022-04-24 20:34:01.452 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:34:01.964 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:34:01.970 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:34:01.970 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:34:01.970 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:34:02.162 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:34:02.162 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4315 ms +2022-04-24 20:34:02.664 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:34:03.040 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:34:04.181 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:34:04.384 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:34:05.122 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:34:05.160 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:34:05.206 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:34:05.556 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:34:05.579 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:34:05.582 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.748 seconds (JVM running for 11.416) +2022-04-24 20:35:05.035 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:35:05.036 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:35:05.040 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 4 ms +2022-04-24 20:37:15.506 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 4980 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:37:15.521 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:37:18.304 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:37:18.313 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:37:18.347 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 13ms. Found 0 repository interfaces. +2022-04-24 20:37:18.981 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:37:19.369 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:37:19.382 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:37:19.383 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:37:19.383 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:37:19.506 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:37:19.508 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3699 ms +2022-04-24 20:37:19.822 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:37:20.134 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:37:21.116 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:37:21.275 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:37:21.986 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:37:22.005 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:37:22.068 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:37:22.377 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:37:22.403 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:37:22.405 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.472 seconds (JVM running for 10.023) +2022-04-24 20:37:34.812 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:37:34.813 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:37:34.839 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 26 ms +2022-04-24 20:38:09.069 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 10216 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-24 20:38:09.080 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-24 20:38:11.570 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-24 20:38:11.572 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-24 20:38:11.623 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 32ms. Found 0 repository interfaces. +2022-04-24 20:38:12.325 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-24 20:38:12.719 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-24 20:38:12.744 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-24 20:38:12.746 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-24 20:38:12.748 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-24 20:38:12.874 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-24 20:38:12.874 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3531 ms +2022-04-24 20:38:13.200 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-24 20:38:13.462 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-24 20:38:14.361 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-24 20:38:14.518 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-24 20:38:15.291 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-24 20:38:15.300 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-24 20:38:15.362 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-24 20:38:15.652 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-24 20:38:15.695 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-24 20:38:15.697 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.379 seconds (JVM running for 10.235) +2022-04-24 20:38:19.835 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-24 20:38:19.836 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-24 20:38:19.850 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 13 ms diff --git a/guli_parent/service/service_edu/edu/info/log-info-2022-04-25.0.log b/guli_parent/service/service_edu/edu/info/log-info-2022-04-25.0.log new file mode 100644 index 0000000..47c7572 --- /dev/null +++ b/guli_parent/service/service_edu/edu/info/log-info-2022-04-25.0.log @@ -0,0 +1,200 @@ +2022-04-25 10:55:47.916 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 6060 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 10:55:47.921 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 10:55:50.907 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 10:55:50.909 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 10:55:50.982 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 33ms. Found 0 repository interfaces. +2022-04-25 10:55:51.396 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 10:55:51.874 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 10:55:51.906 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 10:55:51.906 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 10:55:51.906 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 10:55:52.048 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 10:55:52.049 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3866 ms +2022-04-25 10:55:52.448 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 10:55:52.657 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 10:55:53.661 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 10:55:53.801 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 10:55:54.651 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 10:55:54.663 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 10:55:54.722 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 10:55:55.000 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 10:55:55.047 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 10:55:55.052 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.125 seconds (JVM running for 11.296) +2022-04-25 10:56:29.975 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 10:56:29.977 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 10:56:29.996 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 18 ms +2022-04-25 11:55:14.432 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 8096 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 11:55:14.435 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 11:55:16.999 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 11:55:17.003 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 11:55:17.095 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 40ms. Found 0 repository interfaces. +2022-04-25 11:55:17.613 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 11:55:18.009 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 11:55:18.015 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 11:55:18.018 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 11:55:18.019 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 11:55:18.361 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 11:55:18.361 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3763 ms +2022-04-25 11:55:18.695 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 11:55:19.039 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 11:55:20.165 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 11:55:20.340 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 11:55:20.988 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 11:55:21.023 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 11:55:21.069 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 11:55:21.406 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 11:55:21.426 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 11:55:21.428 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.584 seconds (JVM running for 12.722) +2022-04-25 11:56:12.089 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 11:56:12.089 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 11:56:12.098 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 9 ms +2022-04-25 11:59:23.301 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 6836 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 11:59:23.323 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 11:59:29.258 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 11:59:29.259 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 11:59:29.283 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 14ms. Found 0 repository interfaces. +2022-04-25 11:59:29.845 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 11:59:30.474 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 11:59:30.483 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 11:59:30.484 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 11:59:30.484 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 11:59:30.621 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 11:59:30.622 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 6908 ms +2022-04-25 11:59:30.968 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 11:59:31.221 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 11:59:32.223 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 11:59:32.417 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 11:59:33.023 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 11:59:33.035 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 11:59:33.092 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 11:59:33.376 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 11:59:33.415 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 11:59:33.417 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 13.949 seconds (JVM running for 18.534) +2022-04-25 11:59:34.890 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 11:59:34.890 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 11:59:34.914 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 23 ms +2022-04-25 12:01:40.333 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 3804 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 12:01:40.403 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 12:01:42.726 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 12:01:42.728 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 12:01:42.798 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 11ms. Found 0 repository interfaces. +2022-04-25 12:01:43.430 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 12:01:43.801 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 12:01:43.829 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 12:01:43.833 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 12:01:43.834 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 12:01:43.952 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 12:01:43.954 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3429 ms +2022-04-25 12:01:44.307 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 12:01:44.536 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 12:01:45.603 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 12:01:45.799 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 12:01:46.514 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 12:01:46.530 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 12:01:46.582 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 12:01:46.865 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 12:01:46.910 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 12:01:46.912 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.617 seconds (JVM running for 12.716) +2022-04-25 12:01:51.334 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 12:01:51.334 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 12:01:51.346 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 12 ms +2022-04-25 12:03:38.422 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 4976 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 12:03:38.437 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 12:03:40.592 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 12:03:40.594 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 12:03:40.656 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 10ms. Found 0 repository interfaces. +2022-04-25 12:03:41.190 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 12:03:41.523 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 12:03:41.530 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 12:03:41.530 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 12:03:41.531 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 12:03:41.667 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 12:03:41.668 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2782 ms +2022-04-25 12:03:41.970 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 12:03:42.194 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 12:03:43.194 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 12:03:43.386 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 12:03:44.194 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 12:03:44.221 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 12:03:44.270 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 12:03:44.810 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 12:03:44.891 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 12:03:44.904 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.126 seconds (JVM running for 9.781) +2022-04-25 12:03:48.246 [http-nio-8001-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 12:03:48.247 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 12:03:48.272 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 24 ms +2022-04-25 12:05:36.662 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 4432 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 12:05:36.693 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 12:05:39.522 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 12:05:39.535 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 12:05:39.603 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 38ms. Found 0 repository interfaces. +2022-04-25 12:05:40.148 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 12:05:40.589 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 12:05:40.599 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 12:05:40.602 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 12:05:40.603 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 12:05:40.739 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 12:05:40.739 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3617 ms +2022-04-25 12:05:41.141 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 12:05:41.473 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 12:05:42.476 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 12:05:42.651 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 12:05:43.412 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 12:05:43.455 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 12:05:43.517 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 12:05:43.861 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 12:05:43.891 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 12:05:43.901 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.607 seconds (JVM running for 12.458) +2022-04-25 12:05:52.260 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 12:05:52.261 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 12:05:52.267 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 5 ms +2022-04-25 12:07:16.304 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 604 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 12:07:16.334 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 12:07:17.131 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 12:07:17.133 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 12:07:17.159 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 12ms. Found 0 repository interfaces. +2022-04-25 12:07:17.402 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 12:07:17.573 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 12:07:17.579 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 12:07:17.580 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 12:07:17.580 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 12:07:17.645 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 12:07:17.645 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1284 ms +2022-04-25 12:07:17.766 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 12:07:17.889 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 12:07:18.463 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 12:07:18.543 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 12:07:18.871 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 12:07:18.881 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 12:07:18.903 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 12:07:19.030 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 12:07:19.045 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 12:07:19.047 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 3.142 seconds (JVM running for 3.633) +2022-04-25 12:07:20.759 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 12:07:20.759 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 12:07:20.766 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 6 ms +2022-04-25 12:12:48.641 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 2676 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-25 12:12:48.664 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-25 12:12:53.923 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-25 12:12:53.942 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-25 12:12:54.077 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 60ms. Found 0 repository interfaces. +2022-04-25 12:12:55.405 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-25 12:12:56.446 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-25 12:12:56.483 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-25 12:12:56.486 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-25 12:12:56.490 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-25 12:12:56.869 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-25 12:12:56.870 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 8023 ms +2022-04-25 12:12:57.857 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-25 12:12:58.648 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-25 12:13:01.757 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-25 12:13:02.229 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-25 12:13:04.382 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-25 12:13:04.468 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-25 12:13:04.682 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-25 12:13:06.135 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-25 12:13:06.235 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-25 12:13:06.254 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 21.55 seconds (JVM running for 25.839) +2022-04-25 12:13:08.606 [http-nio-8001-exec-3] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-25 12:13:08.606 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-25 12:13:08.611 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 5 ms diff --git a/guli_parent/service/service_edu/edu/info/log-info-2022-04-27.0.log b/guli_parent/service/service_edu/edu/info/log-info-2022-04-27.0.log new file mode 100644 index 0000000..0121a17 --- /dev/null +++ b/guli_parent/service/service_edu/edu/info/log-info-2022-04-27.0.log @@ -0,0 +1,72 @@ +2022-04-27 13:37:36.533 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 12832 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-27 13:37:36.538 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-27 13:37:38.522 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-27 13:37:38.523 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-27 13:37:38.570 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 33ms. Found 0 repository interfaces. +2022-04-27 13:37:38.990 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-27 13:37:39.391 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-27 13:37:39.400 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-27 13:37:39.400 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-27 13:37:39.400 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-27 13:37:39.536 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-27 13:37:39.536 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2838 ms +2022-04-27 13:37:39.915 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-27 13:37:40.522 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-27 13:37:43.505 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-27 13:37:44.212 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-27 13:37:46.297 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-27 13:37:46.350 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-27 13:37:46.495 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-27 13:37:46.944 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-27 13:37:46.964 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-27 13:37:46.966 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 11.822 seconds (JVM running for 13.597) +2022-04-27 13:37:49.095 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-27 13:37:49.096 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-27 13:37:49.101 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 5 ms +2022-04-27 13:40:14.385 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13328 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-27 13:40:14.389 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-27 13:40:17.223 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-27 13:40:17.224 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-27 13:40:17.272 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 35ms. Found 0 repository interfaces. +2022-04-27 13:40:17.623 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-27 13:40:17.969 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-27 13:40:17.980 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-27 13:40:17.983 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-27 13:40:17.986 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-27 13:40:18.175 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-27 13:40:18.175 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3603 ms +2022-04-27 13:40:18.485 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-27 13:40:18.682 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-27 13:40:19.568 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-27 13:40:19.716 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-27 13:40:20.285 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-27 13:40:20.297 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-27 13:40:20.354 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-27 13:40:20.642 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-27 13:40:20.691 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-27 13:40:20.693 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.445 seconds (JVM running for 8.662) +2022-04-27 13:40:30.313 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 12844 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-04-27 13:40:30.316 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-04-27 13:40:32.809 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-04-27 13:40:32.817 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-04-27 13:40:32.853 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 17ms. Found 0 repository interfaces. +2022-04-27 13:40:33.525 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-04-27 13:40:33.888 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-04-27 13:40:33.898 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-04-27 13:40:33.899 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-04-27 13:40:33.899 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-04-27 13:40:34.094 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-04-27 13:40:34.095 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3460 ms +2022-04-27 13:40:34.421 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-04-27 13:40:34.644 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-04-27 13:40:35.501 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-04-27 13:40:35.631 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-04-27 13:40:36.289 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-04-27 13:40:36.304 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-04-27 13:40:36.365 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-04-27 13:40:36.611 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-04-27 13:40:36.636 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-04-27 13:40:36.637 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.623 seconds (JVM running for 9.067) +2022-04-27 13:41:03.686 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-04-27 13:41:03.687 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-04-27 13:41:03.691 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 4 ms diff --git a/guli_parent/service/service_edu/edu/info/log-info-2022-05-05.0.log b/guli_parent/service/service_edu/edu/info/log-info-2022-05-05.0.log new file mode 100644 index 0000000..9fafb67 --- /dev/null +++ b/guli_parent/service/service_edu/edu/info/log-info-2022-05-05.0.log @@ -0,0 +1,397 @@ +2022-05-05 11:37:05.920 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 12264 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 11:37:05.923 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 11:37:12.890 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 11:37:12.910 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 11:37:13.275 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 113ms. Found 0 repository interfaces. +2022-05-05 11:37:14.935 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 11:37:16.315 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 11:37:16.325 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 11:37:16.329 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 11:37:16.330 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 11:37:17.177 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 11:37:17.178 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 10926 ms +2022-05-05 11:37:18.227 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 11:37:19.132 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 11:37:22.267 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 11:37:22.652 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 11:37:25.649 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 11:37:25.806 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 11:37:25.978 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 11:37:26.597 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 11:37:26.680 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 11:37:26.696 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 25.243 seconds (JVM running for 30.823) +2022-05-05 11:38:03.043 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 11:38:03.044 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 11:38:03.058 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 14 ms +2022-05-05 13:22:29.735 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 9428 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 13:22:29.744 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 13:22:31.522 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 13:22:31.524 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 13:22:31.559 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 21ms. Found 0 repository interfaces. +2022-05-05 13:22:32.053 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 13:22:32.452 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 13:22:32.459 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 13:22:32.460 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 13:22:32.460 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 13:22:32.606 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 13:22:32.607 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2682 ms +2022-05-05 13:22:32.993 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 13:22:33.264 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 13:22:34.604 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 13:22:34.782 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 13:22:35.546 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 13:22:35.580 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 13:22:35.618 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 13:22:35.950 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 13:22:35.992 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 13:22:35.994 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.669 seconds (JVM running for 9.004) +2022-05-05 13:22:52.702 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 13:22:52.702 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 13:22:52.713 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 10 ms +2022-05-05 13:36:22.598 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13772 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 13:36:22.608 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 13:36:24.731 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 13:36:24.733 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 13:36:24.791 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 12ms. Found 0 repository interfaces. +2022-05-05 13:36:25.249 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 13:36:25.592 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 13:36:25.597 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 13:36:25.597 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 13:36:25.597 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 13:36:25.716 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 13:36:25.717 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2924 ms +2022-05-05 13:36:26.062 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 13:36:26.330 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 13:36:27.262 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 13:36:27.400 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 13:36:28.032 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 13:36:28.050 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 13:36:28.106 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 13:36:28.341 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 13:36:28.381 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 13:36:28.383 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.257 seconds (JVM running for 8.57) +2022-05-05 13:36:40.353 [http-nio-8001-exec-3] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 13:36:40.354 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 13:36:40.388 [http-nio-8001-exec-3] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 32 ms +2022-05-05 14:11:14.309 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 5836 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 14:11:14.445 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 14:11:16.661 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 14:11:16.668 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 14:11:16.724 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 16ms. Found 0 repository interfaces. +2022-05-05 14:11:17.269 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 14:11:17.700 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 14:11:17.710 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 14:11:17.711 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 14:11:17.711 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 14:11:17.834 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 14:11:17.834 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3191 ms +2022-05-05 14:11:18.239 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 14:11:18.523 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 14:11:19.645 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 14:11:19.825 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 14:11:20.716 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 14:11:20.758 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 14:11:20.801 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 14:11:21.174 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 14:11:21.219 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 14:11:21.229 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 8.743 seconds (JVM running for 10.445) +2022-05-05 14:11:31.954 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 14:11:31.954 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 14:11:31.979 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 25 ms +2022-05-05 15:22:58.929 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 9984 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 15:22:58.932 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 15:23:00.230 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 15:23:00.233 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 15:23:00.267 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces. +2022-05-05 15:23:00.617 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 15:23:00.864 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 15:23:00.871 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 15:23:00.872 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 15:23:00.872 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 15:23:00.965 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 15:23:00.966 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1947 ms +2022-05-05 15:23:01.167 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 15:23:01.337 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 15:23:02.032 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 15:23:02.149 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 15:23:02.621 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 15:23:02.635 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 15:23:02.669 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 15:23:02.853 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 15:23:02.881 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 15:23:02.884 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 4.67 seconds (JVM running for 5.534) +2022-05-05 15:49:02.980 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 12536 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 15:49:02.994 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 15:49:05.628 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 15:49:05.639 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 15:49:05.724 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 36ms. Found 0 repository interfaces. +2022-05-05 15:49:06.471 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 15:49:06.744 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 15:49:06.760 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 15:49:06.761 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 15:49:06.761 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 15:49:06.895 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 15:49:06.896 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3523 ms +2022-05-05 15:49:07.233 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 15:49:07.453 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 15:49:08.194 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 15:49:08.309 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 15:49:08.806 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 15:49:08.823 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 15:49:08.858 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 15:49:09.106 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 15:49:09.142 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 15:49:09.144 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.706 seconds (JVM running for 8.389) +2022-05-05 15:49:50.605 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 15:49:50.607 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 15:49:50.664 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 55 ms +2022-05-05 15:55:49.141 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 14736 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 15:55:49.156 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 15:55:52.390 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 15:55:52.391 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 15:55:52.456 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 25ms. Found 0 repository interfaces. +2022-05-05 15:55:52.973 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 15:55:53.386 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 15:55:53.394 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 15:55:53.394 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 15:55:53.395 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 15:55:53.594 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 15:55:53.595 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4295 ms +2022-05-05 15:55:53.989 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 15:55:54.324 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 15:55:55.350 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 15:55:55.520 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 15:55:56.301 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 15:55:56.314 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 15:55:56.378 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 15:55:56.714 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 15:55:56.757 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 15:55:56.768 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 10.365 seconds (JVM running for 11.843) +2022-05-05 15:56:02.252 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 15:56:02.257 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 15:56:02.301 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 38 ms +2022-05-05 16:12:47.776 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13736 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 16:12:47.797 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 16:12:52.857 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 16:12:52.865 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 16:12:52.987 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 66ms. Found 0 repository interfaces. +2022-05-05 16:12:53.784 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 16:12:54.241 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 16:12:54.247 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 16:12:54.248 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 16:12:54.248 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 16:12:54.423 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 16:12:54.426 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5946 ms +2022-05-05 16:12:54.794 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 16:12:55.213 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 16:12:56.451 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 16:12:56.743 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 16:12:57.505 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 16:12:57.522 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 16:12:57.586 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 16:12:57.931 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 16:12:57.984 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 16:12:57.986 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 13.464 seconds (JVM running for 16.296) +2022-05-05 16:13:03.247 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 16:13:03.248 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 16:13:03.273 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 25 ms +2022-05-05 16:58:38.826 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 4376 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 16:58:38.859 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 16:58:42.600 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 16:58:42.611 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 16:58:42.695 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 32ms. Found 0 repository interfaces. +2022-05-05 16:58:43.341 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 16:58:43.883 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 16:58:43.901 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 16:58:43.905 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 16:58:43.907 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 16:58:44.076 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 16:58:44.076 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4834 ms +2022-05-05 16:58:44.469 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 16:58:44.762 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 16:58:46.050 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 16:58:46.275 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 16:58:47.109 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 16:58:47.149 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 16:58:47.213 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 16:58:47.556 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 16:58:47.612 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 16:58:47.614 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 10.738 seconds (JVM running for 12.437) +2022-05-05 16:58:54.217 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 16:58:54.219 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 16:58:54.247 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 27 ms +2022-05-05 20:00:33.084 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 15060 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 20:00:33.110 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 20:00:41.457 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 20:00:41.475 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 20:00:41.638 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 70ms. Found 0 repository interfaces. +2022-05-05 20:00:43.209 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 20:00:44.781 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 20:00:44.835 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 20:00:44.844 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 20:00:44.851 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 20:00:45.462 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 20:00:45.467 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 11700 ms +2022-05-05 20:00:46.502 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 20:00:47.264 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 20:00:51.236 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 20:00:52.004 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 20:00:54.825 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 20:00:54.910 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 20:00:55.118 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 20:00:56.493 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 20:00:56.646 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 20:00:56.668 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 28.414 seconds (JVM running for 32.336) +2022-05-05 20:01:02.509 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 20:01:02.511 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 20:01:02.547 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 35 ms +2022-05-05 20:04:49.617 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 11192 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 20:04:49.630 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 20:04:53.450 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 20:04:53.452 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 20:04:53.519 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 11ms. Found 0 repository interfaces. +2022-05-05 20:04:54.317 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 20:04:54.966 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 20:04:54.985 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 20:04:54.986 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 20:04:54.986 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 20:04:55.265 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 20:04:55.270 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5558 ms +2022-05-05 20:04:55.855 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 20:04:56.469 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 20:04:57.818 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 20:04:58.069 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 20:04:59.105 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 20:04:59.122 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 20:04:59.190 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 20:04:59.637 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 20:04:59.657 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 20:04:59.670 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 12.286 seconds (JVM running for 15.079) +2022-05-05 20:05:36.833 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 20:05:36.833 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 20:05:36.864 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 30 ms +2022-05-05 20:12:47.949 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 9780 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 20:12:47.964 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 20:12:51.922 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 20:12:51.933 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 20:12:52.079 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 66ms. Found 0 repository interfaces. +2022-05-05 20:12:52.871 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 20:12:53.295 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 20:12:53.328 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 20:12:53.331 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 20:12:53.332 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 20:12:53.477 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 20:12:53.477 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5137 ms +2022-05-05 20:12:53.860 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 20:12:54.156 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 20:12:55.428 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 20:12:55.618 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 20:12:56.411 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 20:12:56.423 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 20:12:56.491 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 20:12:56.874 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 20:12:56.892 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 20:12:56.895 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 10.955 seconds (JVM running for 14.384) +2022-05-05 20:13:01.959 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 20:13:01.960 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 20:13:01.991 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 31 ms +2022-05-05 20:26:48.368 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 2440 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 20:26:48.381 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 20:26:51.185 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 20:26:51.192 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 20:26:51.242 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 20ms. Found 0 repository interfaces. +2022-05-05 20:26:51.883 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 20:26:52.347 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 20:26:52.352 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 20:26:52.353 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 20:26:52.353 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 20:26:52.474 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 20:26:52.475 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3879 ms +2022-05-05 20:26:52.823 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 20:26:53.172 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 20:26:54.622 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 20:26:54.810 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 20:26:55.560 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 20:26:55.596 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 20:26:55.662 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 20:26:56.026 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 20:26:56.076 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 20:26:56.084 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 9.152 seconds (JVM running for 11.319) +2022-05-05 20:27:05.937 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 20:27:05.940 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 20:27:05.974 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 32 ms +2022-05-05 21:54:44.143 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 5988 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 21:54:44.158 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 21:54:49.356 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 21:54:49.367 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 21:54:49.460 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 39ms. Found 0 repository interfaces. +2022-05-05 21:54:50.625 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 21:54:52.161 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 21:54:52.199 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 21:54:52.202 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 21:54:52.203 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 21:54:52.726 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 21:54:52.727 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 8247 ms +2022-05-05 21:54:53.813 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 21:54:55.835 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 21:55:00.308 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 21:55:00.705 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 21:55:03.171 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 21:55:03.243 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 21:55:03.463 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 21:55:04.635 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 21:55:04.791 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 21:55:04.804 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 26.684 seconds (JVM running for 32.374) +2022-05-05 21:55:06.286 [http-nio-8001-exec-2] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 21:55:06.288 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 21:55:06.332 [http-nio-8001-exec-2] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 43 ms +2022-05-05 21:58:14.043 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 11572 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 21:58:14.068 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 21:58:17.062 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 21:58:17.079 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 21:58:17.185 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 42ms. Found 0 repository interfaces. +2022-05-05 21:58:18.261 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 21:58:18.851 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 21:58:18.865 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 21:58:18.870 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 21:58:18.871 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 21:58:19.047 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 21:58:19.047 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4884 ms +2022-05-05 21:58:19.449 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 21:58:19.778 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 21:58:21.351 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 21:58:21.560 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 21:58:22.293 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 21:58:22.308 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 21:58:22.365 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 21:58:22.767 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 21:58:22.789 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 21:58:22.800 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 10.623 seconds (JVM running for 12.117) +2022-05-05 21:58:37.323 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 21:58:37.323 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 21:58:37.327 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 4 ms +2022-05-05 21:59:44.960 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13024 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-05 21:59:44.979 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-05 21:59:49.624 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-05 21:59:49.633 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-05 21:59:49.718 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 40ms. Found 0 repository interfaces. +2022-05-05 21:59:50.455 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-05 21:59:50.950 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-05 21:59:50.984 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-05 21:59:50.985 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-05 21:59:50.986 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-05 21:59:51.187 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-05 21:59:51.187 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5753 ms +2022-05-05 21:59:51.646 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-05 21:59:52.237 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-05 21:59:53.849 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-05 21:59:54.079 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-05 21:59:55.110 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-05 21:59:55.124 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-05 21:59:55.189 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-05 21:59:55.653 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-05 21:59:55.676 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-05 21:59:55.687 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 13.226 seconds (JVM running for 16.838) +2022-05-05 22:00:07.033 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-05 22:00:07.034 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-05 22:00:07.067 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 32 ms diff --git a/guli_parent/service/service_edu/edu/log_error.log b/guli_parent/service/service_edu/edu/log_error.log new file mode 100644 index 0000000..3632226 --- /dev/null +++ b/guli_parent/service/service_edu/edu/log_error.log @@ -0,0 +1,106 @@ +2022-05-05 13:35:38.424 [http-nio-8001-exec-10] ERROR c.a.s.exceptionhandler.GlobalExceptionHandler - GuliException(code=20001, msg=执行了自定义异常处理...) + at com.atguigu.eduservice.controller.EduTeacherController.findAllTeacher(EduTeacherController.java:54) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) + at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) + at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) + at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) + at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) + at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) + at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) + at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) + at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) + at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) + at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) + at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) + at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) + at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) + at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) + at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) + at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) + at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) + at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) + at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) + at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) + at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) + at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) + at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) + at java.lang.Thread.run(Thread.java:748) + +2022-05-05 13:35:46.902 [http-nio-8001-exec-6] ERROR c.a.s.exceptionhandler.GlobalExceptionHandler - GuliException(code=20001, msg=执行了自定义异常处理...) + at com.atguigu.eduservice.controller.EduTeacherController.findAllTeacher(EduTeacherController.java:54) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) + at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) + at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) + at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) + at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) + at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) + at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) + at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) + at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) + at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) + at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) + at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) + at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) + at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) + at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) + at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) + at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) + at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) + at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) + at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) + at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) + at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) + at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) + at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) + at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) + at java.lang.Thread.run(Thread.java:748) + diff --git a/guli_parent/service/service_edu/edu/log_info.log b/guli_parent/service/service_edu/edu/log_info.log new file mode 100644 index 0000000..ba4edc5 --- /dev/null +++ b/guli_parent/service/service_edu/edu/log_info.log @@ -0,0 +1,172 @@ +2022-05-06 09:52:35.727 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 15204 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 09:52:35.895 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 09:52:40.103 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 09:52:40.112 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 09:52:40.230 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 47ms. Found 0 repository interfaces. +2022-05-06 09:52:40.848 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 09:52:41.357 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 09:52:41.371 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 09:52:41.372 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 09:52:41.372 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 09:52:41.514 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 09:52:41.515 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5147 ms +2022-05-06 09:52:41.986 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 09:52:42.365 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 09:52:43.652 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 09:52:43.906 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 09:52:44.986 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 09:52:45.020 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 09:52:45.065 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 09:52:45.511 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 09:52:45.533 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 09:52:45.536 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 13.212 seconds (JVM running for 15.645) +2022-05-06 09:53:56.118 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-06 09:53:56.118 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-06 09:53:56.148 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 30 ms +2022-05-06 10:57:01.474 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 12332 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 10:57:01.531 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 10:57:08.139 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 10:57:08.164 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 10:57:08.457 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 154ms. Found 0 repository interfaces. +2022-05-06 10:57:10.323 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 10:57:11.494 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 10:57:11.541 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 10:57:11.543 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 10:57:11.546 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 10:57:11.963 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 10:57:11.964 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 9710 ms +2022-05-06 10:57:12.883 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 10:57:13.569 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 10:57:16.737 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 10:57:17.184 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 10:57:19.150 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 10:57:19.209 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 10:57:19.303 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 10:57:20.172 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 10:57:20.220 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 10:57:20.238 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 23.142 seconds (JVM running for 26.723) +2022-05-06 11:08:35.770 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 13764 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 11:08:35.790 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 11:08:42.862 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 11:08:42.914 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 11:08:43.151 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 92ms. Found 0 repository interfaces. +2022-05-06 11:08:45.479 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 11:08:47.255 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 11:08:47.341 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 11:08:47.346 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 11:08:47.362 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 11:08:48.160 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 11:08:48.168 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 12056 ms +2022-05-06 11:08:49.566 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 11:08:50.610 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 11:08:54.309 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 11:08:54.972 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 11:08:57.158 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 11:08:57.254 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 11:08:57.443 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 11:08:58.668 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 11:08:58.749 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 11:08:58.770 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 26.387 seconds (JVM running for 29.882) +2022-05-06 11:09:05.928 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-06 11:09:05.931 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-06 11:09:05.965 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 31 ms +2022-05-06 11:11:22.419 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 14116 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 11:11:22.423 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 11:11:24.227 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 11:11:24.228 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 11:11:24.315 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 24ms. Found 0 repository interfaces. +2022-05-06 11:11:24.877 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 11:11:25.223 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 11:11:25.229 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 11:11:25.230 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 11:11:25.230 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 11:11:25.362 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 11:11:25.363 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2671 ms +2022-05-06 11:11:25.631 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 11:11:25.828 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 11:11:27.023 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 11:11:27.268 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 11:11:27.873 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 11:11:27.882 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 11:11:27.926 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 11:11:28.213 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 11:11:28.233 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 11:11:28.235 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.039 seconds (JVM running for 8.971) +2022-05-06 11:11:32.024 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-06 11:11:32.026 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-06 11:11:32.033 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 5 ms +2022-05-06 11:14:30.219 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 11988 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 11:14:30.235 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 11:14:32.096 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 11:14:32.098 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 11:14:32.122 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces. +2022-05-06 11:14:32.506 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 11:14:32.813 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 11:14:32.832 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 11:14:32.832 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 11:14:32.833 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 11:14:32.925 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 11:14:32.925 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2594 ms +2022-05-06 11:14:33.236 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 11:14:33.448 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 11:14:34.377 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 11:14:34.519 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 11:14:35.107 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 11:14:35.116 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 11:14:35.171 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 11:14:35.483 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 11:14:35.510 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 11:14:35.512 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 6.722 seconds (JVM running for 7.686) +2022-05-06 11:14:40.991 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-06 11:14:40.992 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-06 11:14:41.010 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 18 ms +2022-05-06 11:17:35.715 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 8296 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 11:17:35.718 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 11:17:37.702 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 11:17:37.704 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 11:17:37.767 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 9ms. Found 0 repository interfaces. +2022-05-06 11:17:38.298 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 11:17:38.631 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 11:17:38.636 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 11:17:38.637 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 11:17:38.637 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 11:17:38.759 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 11:17:38.760 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2849 ms +2022-05-06 11:17:39.045 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 11:17:39.303 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 11:17:40.176 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 11:17:40.307 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 11:17:40.969 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 11:17:40.978 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 11:17:41.041 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 11:17:41.421 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 11:17:41.442 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 11:17:41.444 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 6.944 seconds (JVM running for 8.254) +2022-05-06 11:17:48.500 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-06 11:17:48.501 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-06 11:17:48.509 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 8 ms +2022-05-06 11:18:43.986 [main] INFO com.atguigu.eduservice.EduApplication - Starting EduApplication on SKY-20201118IYZ with PID 15180 (E:\self_example\guli_parent\service\service_edu\target\classes started by Administrator in E:\self_example\guli_parent) +2022-05-06 11:18:43.989 [main] INFO com.atguigu.eduservice.EduApplication - The following profiles are active: dev +2022-05-06 11:18:46.183 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2022-05-06 11:18:46.185 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. +2022-05-06 11:18:46.223 [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 19ms. Found 0 repository interfaces. +2022-05-06 11:18:46.792 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2022-05-06 11:18:47.210 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8001 (http) +2022-05-06 11:18:47.250 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"] +2022-05-06 11:18:47.251 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] +2022-05-06 11:18:47.251 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.27] +2022-05-06 11:18:47.390 [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2022-05-06 11:18:47.390 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 3257 ms +2022-05-06 11:18:47.787 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... +2022-05-06 11:18:48.020 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. +2022-05-06 11:18:48.934 [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)] +2022-05-06 11:18:49.072 [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' +2022-05-06 11:18:49.781 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed +2022-05-06 11:18:49.790 [main] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2022-05-06 11:18:49.849 [main] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references +2022-05-06 11:18:50.136 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"] +2022-05-06 11:18:50.176 [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8001 (http) with context path '' +2022-05-06 11:18:50.182 [main] INFO com.atguigu.eduservice.EduApplication - Started EduApplication in 7.938 seconds (JVM running for 10.394) +2022-05-06 11:18:54.742 [http-nio-8001-exec-1] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2022-05-06 11:18:54.742 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2022-05-06 11:18:54.773 [http-nio-8001-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - Completed initialization in 31 ms diff --git a/guli_parent/service/service_edu/edu/log_warn.log b/guli_parent/service/service_edu/edu/log_warn.log new file mode 100644 index 0000000..e69de29 diff --git a/guli_parent/service/service_edu/pom.xml b/guli_parent/service/service_edu/pom.xml new file mode 100644 index 0000000..2d21775 --- /dev/null +++ b/guli_parent/service/service_edu/pom.xml @@ -0,0 +1,25 @@ + + + + service + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + service_edu + + + + + + com.alibaba + easyexcel + 2.1.1 + + + + + \ No newline at end of file diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/EduApplication.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/EduApplication.java new file mode 100644 index 0000000..e578330 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/EduApplication.java @@ -0,0 +1,18 @@ +package com.atguigu.eduservice; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication +@ComponentScan(basePackages = {"com.atguigu"}) +public class EduApplication { + + public static void main(String[] args) { + + SpringApplication.run(EduApplication.class,args); + + } + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/config/EduConfig.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/config/EduConfig.java new file mode 100644 index 0000000..f843378 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/config/EduConfig.java @@ -0,0 +1,28 @@ +package com.atguigu.eduservice.config; + + +import com.baomidou.mybatisplus.core.injector.ISqlInjector; +import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@MapperScan("com.atguigu.eduservice.mapper") +public class EduConfig { + + //插件配置逻辑删除 + @Bean + public ISqlInjector sqlInjector() { + return new LogicSqlInjector(); + } + + //分页插件 + @Bean + public PaginationInterceptor paginationInterceptor() { + return new PaginationInterceptor(); + } + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduChapterController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduChapterController.java new file mode 100644 index 0000000..573da02 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduChapterController.java @@ -0,0 +1,81 @@ +package com.atguigu.eduservice.controller; + + +import com.atguigu.commonutils.R; +import com.atguigu.eduservice.entity.EduChapter; +import com.atguigu.eduservice.entity.chapter.ChapterVo; +import com.atguigu.eduservice.service.EduChapterService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.web.ConditionalOnEnabledResourceChain; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + *

+ * 课程 前端控制器 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/eduservice/edu-chapter") +@CrossOrigin +public class EduChapterController { + + @Autowired + private EduChapterService chapterService; + + //课程大纲列表,根据课程id进行查询 + @GetMapping("getChapterVideo/{courseId}") + public R getChapterVideo(@PathVariable String courseId){ + + List list=chapterService.getChapterVideoByCourseId(courseId); + + + return R.ok().data("list",list); + + } + + //添加章节 + @PostMapping("addChapter") + public R addChapter(@RequestBody EduChapter chapter){ + chapterService.save(chapter); + return R.ok(); + } + + //根据章节id查询 + @GetMapping("getChapter/{chapterId}") + public R getChapter(@PathVariable String chapterId){ + + EduChapter chapter = chapterService.getById(chapterId); + + return R.ok().data("chapter",chapter); + + } + + //修改 + @PostMapping("updateChapter") + public R updateChapter(@RequestBody EduChapter chapter){ + chapterService.updateById(chapter); + return R.ok(); + } + + + //删除 + @DeleteMapping("{chapterId}") + public R deleteChapter(@PathVariable String chapterId){ + + boolean flag=chapterService.deleteChapter(chapterId); + if(flag){ + return R.ok(); + }else { + return R.error(); + } + + + } + +} + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduCourseCollectController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduCourseCollectController.java new file mode 100644 index 0000000..b105336 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduCourseCollectController.java @@ -0,0 +1,21 @@ +package com.atguigu.eduservice.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 课程收藏 前端控制器 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/eduservice/edu-course-collect") +public class EduCourseCollectController { + +} + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduCourseController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduCourseController.java new file mode 100644 index 0000000..29064e3 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduCourseController.java @@ -0,0 +1,123 @@ +package com.atguigu.eduservice.controller; + + +import com.atguigu.commonutils.R; +import com.atguigu.eduservice.entity.EduCourse; +import com.atguigu.eduservice.entity.vo.CourseInfoVo; +import com.atguigu.eduservice.entity.vo.CoursePublishVo; +import com.atguigu.eduservice.entity.vo.CourseQuery; +import com.atguigu.eduservice.service.EduCourseService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.logging.log4j.util.Strings; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + *

+ * 课程 前端控制器 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/eduservice/edu-course") +@CrossOrigin +public class EduCourseController { + + @Autowired + private EduCourseService courseService; + + //课程列表 TODO + //完善条件查询;带分页功能 + @PostMapping("pageCourseCondition/{current}/{limit}") + public R pageCourseCondition(@PathVariable int current,@PathVariable int limit,@RequestBody(required = false) CourseQuery courseQuery){ + + Page page=new Page<>(current,limit); + QueryWrapper wrapper=new QueryWrapper<>(); + + String title = courseQuery.getTitle(); + String status = courseQuery.getStatus(); + + if(!Strings.isEmpty(title)){ + wrapper.like("title",title); + } + + if(!Strings.isEmpty(status)){ + wrapper.eq("status",status); + } + + courseService.page(page,wrapper); + long total = page.getTotal(); + List records = page.getRecords(); + + return R.ok().data("total",total).data("records",records); + } + + + //添加客户才能基本信息的方法 + @PostMapping("addCourseInfo") + public R addCourseInfo(@RequestBody CourseInfoVo courseInfoVo){ + + //返回添加之后课程id,为了后面添加大纲使用 + String cid=courseService.saveCourseInfo(courseInfoVo); + + + return R.ok().data("courseId",cid); + } + + //根据课程id查询课程的基本信息 + @GetMapping("getCourseInfo/{courseId}") + public R getCourseIndo(@PathVariable String courseId){ + CourseInfoVo courseInfoVo=courseService.getCourseInfo(courseId); + + return R.ok().data("courseInfoVo",courseInfoVo); + } + + //修改课程信息 + @PostMapping("updateCourseInfo") + public R updateCourseInfo(@RequestBody CourseInfoVo courseInfoVo){ + courseService.updateCourseInfo(courseInfoVo); + return R.ok(); + } + + //根据课程id查询课程确认信息 + @GetMapping("getPublishCourseInfo/{courseId}") + public R getPublishCourseInfo(@PathVariable String courseId){ + CoursePublishVo coursePublishVo=courseService.publishCourseInfo(courseId); + + return R.ok().data("coursePublishVo",coursePublishVo); + } + + //课程的最终发布 + //修改课程状态 + @PostMapping("publishCourse/{courseId}") + public R publishCourse(@PathVariable String courseId){ + EduCourse eduCourse=new EduCourse(); + eduCourse.setId(courseId); + eduCourse.setStatus("Normal"); //设置课程为发布状态 + courseService.updateById(eduCourse); + + return R.ok(); + + } + + //删除课程信息 + @DeleteMapping("{courseId}") + public R deleteCourseById(@PathVariable String courseId){ + + courseService.removeCourse(courseId); + + + return R.ok(); + + + + } + + +} + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduLoginController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduLoginController.java new file mode 100644 index 0000000..afe0963 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduLoginController.java @@ -0,0 +1,30 @@ +package com.atguigu.eduservice.controller; + + +import com.atguigu.commonutils.R; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("/eduservice/user") +@CrossOrigin //解决跨域问题 +public class EduLoginController { + + + //Login + @PostMapping("login") + public R login(){ + + return R.ok().data("token","admin"); + } + + + //info + @GetMapping("info") + public R info(){ + + return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif"); + } + + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduSubjectController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduSubjectController.java new file mode 100644 index 0000000..4107410 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduSubjectController.java @@ -0,0 +1,61 @@ +package com.atguigu.eduservice.controller; + + +import com.atguigu.commonutils.R; +import com.atguigu.eduservice.entity.subject.OneSubject; +import com.atguigu.eduservice.service.EduSubjectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.support.MultipartFilter; + +import java.util.List; + +/** + *

+ * 课程科目 前端控制器 + *

+ * + * @author Ding + * @since 2022-04-24 + */ +@RestController +@RequestMapping("/eduservice/edu-subject") +@CrossOrigin +public class EduSubjectController { + + @Autowired + private EduSubjectService subjectService; + + //添加课程分类 + //获取上传文件,把文件内容读取出来 + @PostMapping("addSubject") + public R addSubject(MultipartFile file){ + + //获取上传过来的excel文件 + //TODO 为了能在监听器中获取到service对象,这里直接将service传入进去 + subjectService.saveSubject(file,subjectService); + + + return R.ok(); + + } + + //课程分类的列表功能(使用树形结构实现) + @GetMapping("getAllSubject") + public R getAllSubject(){ + //list集合中的泛型是一级分类 + List list =subjectService.getAllOneTwoSubject(); + + + return R.ok().data("list",list); + } + + + + + + +} + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduTeacherController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduTeacherController.java new file mode 100644 index 0000000..ceb1a91 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduTeacherController.java @@ -0,0 +1,192 @@ +package com.atguigu.eduservice.controller; + + +import com.atguigu.commonutils.R; +import com.atguigu.eduservice.entity.EduTeacher; +import com.atguigu.eduservice.entity.vo.TeacherQuery; +import com.atguigu.eduservice.service.EduTeacherService; +import com.atguigu.servicebase.exceptionhandler.GuliException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.el.lang.ELArithmetic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 讲师 前端控制器 + *

+ * + * @author Ding + * @since 2022-04-21 + */ +@Api(description = "讲师管理") +@RestController +@RequestMapping("/eduservice/edu-teacher") +@CrossOrigin +public class EduTeacherController { + + //把service注入 + @Autowired + private EduTeacherService teacherService; + + + //查询讲师表中的所有数据 + @ApiOperation(value = "所有讲师列表") + @GetMapping("findAll") + public R findAllTeacher(){ + //调用service的方法实现查询所有的操作 + List list = teacherService.list(null); + +// //自定义异常的手动抛出 +// try { +// int k=1/0; +// }catch (Exception e){ +// //执行自定义异常 +// throw new GuliException(20001,"执行了自定义异常处理..."); +// } + + + return R.ok().data("items",list); + } + + //逻辑删除讲师的方法 + @DeleteMapping("{id}") + @ApiOperation(value = "逻辑删除讲师") + public R removeTeacher(@ApiParam(name = "id" ,value = "讲师ID",required = true) @PathVariable("id") String id){ + + boolean result = teacherService.removeById(id); + + if(result){ + return R.ok(); + }else { + return R.error(); + } + } + + /** + * 分页查询讲师的方法 + * @param current 当前页 + * @param limit 每页记录数 + * @return + */ + @GetMapping("pageTeacher/{current}/{limit}") + @ApiOperation(value = "讲师分页查询") + public R pageListTeacher(@PathVariable("current") long current,@PathVariable("limit") long limit){ + + //创建page对象 + Page teacherPage = new Page(current,limit); + + //调用方法显示分页 + //调用方法的时候,底层封装,把分页所有的数据封装到pageTeacher对象里面 + teacherService.page(teacherPage,null); + long total = teacherPage.getTotal(); //总记录数 + List records = teacherPage.getRecords(); //数据list集合 + +// Map map =new HashMap(); +// map.put("total",total); +// map.put("rows",records); +// return R.ok().data(map); + + return R.ok().data("total",total).data("rows",records); + } + + /** + * 条件查询带分页 + * RequestBody :使用json传递数据,把json数据封装到对应对象里面(需要使用postMappering的方式) + */ + +// @GetMapping("pageTeacherCondition/{current}/{limit}") + @PostMapping("pageTeacherCondition/{current}/{limit}") + public R pageTeacherCCondition(@PathVariable("current") long current, @PathVariable("limit") long limit,@RequestBody(required = false) TeacherQuery teacherQuery){ + + //创建一个page对象 + Page teacherPage = new Page<>(current,limit); + //调用方法实现条件查询分页 + //构建条件 + QueryWrapper wrapper = new QueryWrapper<>(); + + //判断条件是否为空g,如果不为空拼接条件 + String name = teacherQuery.getName(); + Integer level = teacherQuery.getLevel(); + String begin = teacherQuery.getBegin(); + String end = teacherQuery.getEnd(); + + if(!StringUtils.isEmpty(name)){ + //构建条件 + wrapper.like("name",name); + } + + if(!StringUtils.isEmpty(level)){ + wrapper.eq("level",level); + } + + if(!StringUtils.isEmpty(begin)){ + wrapper.ge("gmt_create",begin); + } + + if(!StringUtils.isEmpty(end)){ + wrapper.le("gmt_create",end); + } + //排序 + wrapper.orderByDesc("gmt_create"); + + teacherService.page(teacherPage,wrapper); + + long total = teacherPage.getTotal(); //总记录数 + List records = teacherPage.getRecords(); //数据list集合 + + + return R.ok().data("total",total).data("rows",records); + + + } + + + //添加讲师接口的方法 + @PostMapping("addTeacher") + public R addTeacher(@RequestBody EduTeacher eduTeacher){ + + boolean save = teacherService.save(eduTeacher); + if(save) { + return R.ok(); + }else { + return R.error(); + } + + } + + + //根据讲师id进行查询 + @GetMapping("getTeacher/{id}") + public R getTeacher(@PathVariable("id") String id){ + EduTeacher eduTeacher = teacherService.getById(id); + + return R.ok().data("teacher",eduTeacher); + } + + //讲师修改功能(Rest风格的一般使用put,这里为了使用requestbody使用了post提交) + @PostMapping("updateTeacher") + public R updateTeacher(@RequestBody EduTeacher eduTeacher){ + + boolean flag = teacherService.updateById(eduTeacher); + if(flag){ + return R.ok(); + }else{ + return R.error(); + } + + } + + + +} + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduVideoController.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduVideoController.java new file mode 100644 index 0000000..c5eea7b --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/controller/EduVideoController.java @@ -0,0 +1,65 @@ +package com.atguigu.eduservice.controller; + + +import com.atguigu.commonutils.R; +import com.atguigu.eduservice.entity.EduChapter; +import com.atguigu.eduservice.entity.EduVideo; +import com.atguigu.eduservice.service.EduVideoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + *

+ * 课程视频 前端控制器 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@RestController +@RequestMapping("/eduservice/edu-video") +@CrossOrigin +public class EduVideoController { + + @Autowired + private EduVideoService videoService; + + + @PostMapping("addVideo") + public R addVideo(@RequestBody EduVideo eduVideo){ + + videoService.save(eduVideo); + return R.ok(); + } + + //删除小结 + //todo 后面这个方法需要完善:删除小结的时候,同时把里面的视频也删除 + @DeleteMapping("{videoId}") + public R deleteVideo(@PathVariable String videoId){ + + videoService.removeById(videoId); + return R.ok(); + } + + + + //修改小结 + @PostMapping("updateVideo") + public R updateVideo(@RequestBody EduVideo eduVideo){ + + videoService.updateById(eduVideo); + + return R.ok(); + } + + //根据章节id查询 + @GetMapping("getVideo/{videoId}") + public R getVideo(@PathVariable String videoId){ + + EduVideo video = videoService.getById(videoId); + return R.ok().data("video",video); + + } + +} + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduChapter.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduChapter.java new file mode 100644 index 0000000..694a814 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduChapter.java @@ -0,0 +1,54 @@ +package com.atguigu.eduservice.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 课程 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduChapter对象", description="课程") +public class EduChapter implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "章节ID") + @TableId(value = "id", type = IdType.ID_WORKER_STR) + private String id; + + @ApiModelProperty(value = "课程ID") + private String courseId; + + @ApiModelProperty(value = "章节名称") + private String title; + + @ApiModelProperty(value = "显示排序") + private Integer sort; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourse.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourse.java new file mode 100644 index 0000000..0e7fe1f --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourse.java @@ -0,0 +1,83 @@ +package com.atguigu.eduservice.entity; + +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 课程 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduCourse对象", description="课程") +public class EduCourse implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "课程ID") + @TableId(value = "id", type = IdType.ID_WORKER_STR) + private String id; + + @ApiModelProperty(value = "课程讲师ID") + private String teacherId; + + @ApiModelProperty(value = "课程专业ID") + private String subjectId; + + @ApiModelProperty(value = "课程专业父级ID") + private String subjectParentId; + + @ApiModelProperty(value = "课程标题") + private String title; + + @ApiModelProperty(value = "课程销售价格,设置为0则可免费观看") + private BigDecimal price; + + @ApiModelProperty(value = "总课时") + private Integer lessonNum; + + @ApiModelProperty(value = "课程封面图片路径") + private String cover; + + @ApiModelProperty(value = "销售数量") + private Long buyCount; + + @ApiModelProperty(value = "浏览数量") + private Long viewCount; + + @ApiModelProperty(value = "乐观锁") + private Long version; + + @ApiModelProperty(value = "课程状态 Draft未发布 Normal已发布") + private String status; + + @ApiModelProperty(value = "逻辑删除 1(true)已删除, 0(false)未删除") + private Integer isDeleted; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourseCollect.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourseCollect.java new file mode 100644 index 0000000..240fbb1 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourseCollect.java @@ -0,0 +1,54 @@ +package com.atguigu.eduservice.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 课程收藏 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduCourseCollect对象", description="课程收藏") +public class EduCourseCollect implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "收藏ID") + @TableId(value = "id", type = IdType.ID_WORKER_STR) + private String id; + + @ApiModelProperty(value = "课程讲师ID") + private String courseId; + + @ApiModelProperty(value = "课程专业ID") + private String memberId; + + @ApiModelProperty(value = "逻辑删除 1(true)已删除, 0(false)未删除") + private Integer isDeleted; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourseDescription.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourseDescription.java new file mode 100644 index 0000000..63f1bb6 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduCourseDescription.java @@ -0,0 +1,48 @@ +package com.atguigu.eduservice.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 课程简介 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduCourseDescription对象", description="课程简介") +public class EduCourseDescription implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "课程ID") + @TableId(value = "id", type = IdType.INPUT) //手动生成 + private String id; + + @ApiModelProperty(value = "课程简介") + private String description; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduSubject.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduSubject.java new file mode 100644 index 0000000..bdcf7fd --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduSubject.java @@ -0,0 +1,54 @@ +package com.atguigu.eduservice.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 课程科目 + *

+ * + * @author Ding + * @since 2022-04-24 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduSubject对象", description="课程科目") +public class EduSubject implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "课程类别ID") + @TableId(value = "id", type = IdType.ID_WORKER_STR) + private String id; + + @ApiModelProperty(value = "类别名称") + private String title; + + @ApiModelProperty(value = "父ID") + private String parentId; + + @ApiModelProperty(value = "排序字段") + private Integer sort; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduTeacher.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduTeacher.java new file mode 100644 index 0000000..9b40da4 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduTeacher.java @@ -0,0 +1,68 @@ +package com.atguigu.eduservice.entity; + +import com.baomidou.mybatisplus.annotation.*; + +import java.util.Date; + +import java.io.Serializable; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.beans.factory.annotation.Autowired; + +/** + *

+ * 讲师 + *

+ * + * @author Ding + * @since 2022-04-21 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduTeacher对象", description="讲师") +public class EduTeacher implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "讲师ID") + @TableId(value = "id", type = IdType.ID_WORKER_STR) + private String id; + + @ApiModelProperty(value = "讲师姓名") + private String name; + + @ApiModelProperty(value = "讲师简介") + private String intro; + + @ApiModelProperty(value = "讲师资历,一句话说明讲师") + private String career; + + @ApiModelProperty(value = "头衔 1高级讲师 2首席讲师") + private Integer level; + + @ApiModelProperty(value = "讲师头像") + private String avatar; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @ApiModelProperty(value = "逻辑删除 1(true)已删除, 0(false)未删除") + @TableLogic + private Boolean isDeleted; + + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduVideo.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduVideo.java new file mode 100644 index 0000000..23f814f --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/EduVideo.java @@ -0,0 +1,81 @@ +package com.atguigu.eduservice.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 课程视频 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value="EduVideo对象", description="课程视频") +public class EduVideo implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "视频ID") + @TableId(value = "id", type = IdType.ID_WORKER_STR) + private String id; + + @ApiModelProperty(value = "课程ID") + private String courseId; + + @ApiModelProperty(value = "章节ID") + private String chapterId; + + @ApiModelProperty(value = "节点名称") + private String title; + + @ApiModelProperty(value = "云端视频资源") + private String videoSourceId; + + @ApiModelProperty(value = "原始文件名称") + private String videoOriginalName; + + @ApiModelProperty(value = "排序字段") + private Integer sort; + + @ApiModelProperty(value = "播放次数") + private Long playCount; + + @ApiModelProperty(value = "是否可以试听:0收费 1免费") + private Boolean isFree; + + @ApiModelProperty(value = "视频时长(秒)") + private Float duration; + + @ApiModelProperty(value = "Empty未上传 Transcoding转码中 Normal正常") + private String status; + + @ApiModelProperty(value = "视频源文件大小(字节)") + private Long size; + + @ApiModelProperty(value = "乐观锁") + private Long version; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date gmtCreate; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date gmtModified; + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/chapter/ChapterVo.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/chapter/ChapterVo.java new file mode 100644 index 0000000..3794b41 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/chapter/ChapterVo.java @@ -0,0 +1,17 @@ +package com.atguigu.eduservice.entity.chapter; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class ChapterVo { + + private String id; + private String title; + + //表示小结 + private List children =new ArrayList(); + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/chapter/VideoVo.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/chapter/VideoVo.java new file mode 100644 index 0000000..cbe6088 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/chapter/VideoVo.java @@ -0,0 +1,12 @@ +package com.atguigu.eduservice.entity.chapter; + + +import lombok.Data; + +@Data +public class VideoVo { + + private String id; + private String title; + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/excel/SubjectData.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/excel/SubjectData.java new file mode 100644 index 0000000..970e6c3 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/excel/SubjectData.java @@ -0,0 +1,15 @@ +package com.atguigu.eduservice.entity.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +@Data +public class SubjectData { + + @ExcelProperty(index = 0) + private String oneSubjectName; + + @ExcelProperty(index = 1) + private String twoSubjectName; + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/subject/OneSubject.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/subject/OneSubject.java new file mode 100644 index 0000000..3ad4666 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/subject/OneSubject.java @@ -0,0 +1,25 @@ +package com.atguigu.eduservice.entity.subject; + + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * 一级分类 + */ +@Data +public class OneSubject { + + private String id; + + private String title; + + //一个一级分类有多个二级分类 + private List children =new ArrayList<>(); + + + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/subject/TwoSubject.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/subject/TwoSubject.java new file mode 100644 index 0000000..de0a33f --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/subject/TwoSubject.java @@ -0,0 +1,15 @@ +package com.atguigu.eduservice.entity.subject; + + +import lombok.Data; + +/** + * 二级分类 + */ +@Data +public class TwoSubject { + + private String id; + private String title; + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CourseInfoVo.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CourseInfoVo.java new file mode 100644 index 0000000..46dacb0 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CourseInfoVo.java @@ -0,0 +1,50 @@ +package com.atguigu.eduservice.entity.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 课程信息的封装类 + */ +@ApiModel(value = "课程基本信息", description = "编辑课程基本信息的表单对象") +@Data +public class CourseInfoVo { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "课程ID") + private String id; + + @ApiModelProperty(value = "课程讲师ID") + private String teacherId; + + @ApiModelProperty(value = "课程专业ID") + private String subjectId; + + @ApiModelProperty(value = "课程专业父级ID") + private String subjectParentId; + + @ApiModelProperty(value = "课程标题") + private String title; + + @ApiModelProperty(value = "课程销售价格,设置为0则可免费观看") + private BigDecimal price; + + @ApiModelProperty(value = "总课时") + private Integer lessonNum; + + @ApiModelProperty(value = "课程封面图片路径") + private String cover; + + @ApiModelProperty(value = "课程简介") + private String description; + + +} + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CoursePublishVo.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CoursePublishVo.java new file mode 100644 index 0000000..903d8ce --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CoursePublishVo.java @@ -0,0 +1,17 @@ +package com.atguigu.eduservice.entity.vo; + +import lombok.Data; + +@Data +public class CoursePublishVo { + + private String id; + private String title; + private String cover; + private Integer lessonNum; + private String subjectLevelOne; + private String subjectLevelTwo; + private String teacherName; + private String price;//只用于显示 + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CourseQuery.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CourseQuery.java new file mode 100644 index 0000000..c1e75cb --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/CourseQuery.java @@ -0,0 +1,14 @@ +package com.atguigu.eduservice.entity.vo; + +import lombok.Data; + +@Data +public class CourseQuery { + + private String title; + + private String status; + + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/TeacherQuery.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/TeacherQuery.java new file mode 100644 index 0000000..7625fac --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/entity/vo/TeacherQuery.java @@ -0,0 +1,26 @@ +package com.atguigu.eduservice.entity.vo; + + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * teacher的条件查询对象的接口传入类的封装 + */ +@Data +public class TeacherQuery { + +// private static final long serialVersionUID = 1L; + @ApiModelProperty(value = "教师名称,模糊查询") + private String name; + @ApiModelProperty(value = "头衔 1高级讲师 2首席讲师") + private Integer level; + @ApiModelProperty(value = "查询开始时间", example = "2019-01-01 10:10:10") + private String begin;//注意,这里使用的是String类型,前端传过来的数据无需进行类型转换 + @ApiModelProperty(value = "查询结束时间", example = "2019-12-01 10:10:10") + private String end; + + + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/listener/SubjectExcelListener.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/listener/SubjectExcelListener.java new file mode 100644 index 0000000..c7bea97 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/listener/SubjectExcelListener.java @@ -0,0 +1,97 @@ +package com.atguigu.eduservice.listener; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.atguigu.eduservice.entity.EduSubject; +import com.atguigu.eduservice.entity.excel.SubjectData; +import com.atguigu.eduservice.service.EduSubjectService; +import com.atguigu.servicebase.exceptionhandler.GuliException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; + +import javax.print.DocFlavor; + +public class SubjectExcelListener extends AnalysisEventListener { + + //由于SubjectExcelListener不能交给spring进行管理,需要自己new,不能注入其他对象 + //所以不能实现数据库操作 + + + //所以这里使用service有参构造的方式,手动注入的方法 + private EduSubjectService subjectService; + + public SubjectExcelListener() { + } + + public SubjectExcelListener(EduSubjectService subjectService) { + this.subjectService = subjectService; + } + + //读取excel内容,一行一行的进行读取 + @Override + public void invoke(SubjectData subjectData, AnalysisContext analysisContext) { + + if(subjectData ==null){ + throw new GuliException(20001,"文件数据为空"); + } + + //一行一行读取,每次读取有两个值,第一个值一级分类,第二个值二级分类,把两个分类最终加入数据库 + EduSubject existOneSubject = this.existOneSubject(subjectService, subjectData.getOneSubjectName()); + + if(existOneSubject == null){ + //没有相同的一级分类,进行添加 + EduSubject eduSubject = new EduSubject(); + eduSubject.setParentId("0"); + eduSubject.setTitle(subjectData.getOneSubjectName()); //设置一级分类的名称 + subjectService.save(eduSubject); +// 如果一级分类都没有就不需要往后执行了,这里直接return +// return; + } + + //获取二级分类的父id + String pid = existOneSubject.getId(); + + //添加二级分类 + //判断二级分类是否重复 + EduSubject existTwoSubject = this.existTwoSubject(subjectService, subjectData.getTwoSubjectName(), pid); + + if(existTwoSubject == null){ + //没有相同的一级分类,进行添加 + EduSubject eduSubject = new EduSubject(); + eduSubject.setParentId(pid); + eduSubject.setTitle(subjectData.getTwoSubjectName()); //设置二级分类的名称 + subjectService.save(eduSubject); + + } + + + + } + + //判断一级分类不能重复添加 + private EduSubject existOneSubject(EduSubjectService subjectService,String name){ + QueryWrapper wrapper =new QueryWrapper<>(); + wrapper.eq("title",name); + wrapper.eq("parent_id","0"); + //这里感觉尚且有错误,但是还没有进行修改:parent_id为0,而name相同的可能存在多条数据,而这个getOne..., + //TODO 已勘误:查看数据库之后发现只有一级分类的name均不同,所以不存在这个问题 + EduSubject twoSubject = subjectService.getOne(wrapper); + + return twoSubject; + } + + + //判断二级分类不能重复添加 + private EduSubject existTwoSubject(EduSubjectService subjectService, String name, String pid){ + QueryWrapper wrapper =new QueryWrapper<>(); + wrapper.eq("title",name); + wrapper.eq("parent_id",pid); + EduSubject twoSubject = subjectService.getOne(wrapper); + + return twoSubject; + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + + } +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduChapterMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduChapterMapper.java new file mode 100644 index 0000000..d6e7c1b --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduChapterMapper.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduChapter; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 课程 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduChapterMapper extends BaseMapper { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseCollectMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseCollectMapper.java new file mode 100644 index 0000000..06ed555 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseCollectMapper.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduCourseCollect; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 课程收藏 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduCourseCollectMapper extends BaseMapper { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseDescriptionMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseDescriptionMapper.java new file mode 100644 index 0000000..e9d824b --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseDescriptionMapper.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduCourseDescription; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 课程简介 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduCourseDescriptionMapper extends BaseMapper { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseMapper.java new file mode 100644 index 0000000..940010d --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseMapper.java @@ -0,0 +1,20 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduCourse; +import com.atguigu.eduservice.entity.vo.CoursePublishVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * 课程 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduCourseMapper extends BaseMapper { + + CoursePublishVo getPublishCourseInfo(String courseId); + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseMapper.xml new file mode 100644 index 0000000..5a454d6 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduCourseMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduSubjectMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduSubjectMapper.java new file mode 100644 index 0000000..14aff48 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduSubjectMapper.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduSubject; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 课程科目 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-24 + */ +public interface EduSubjectMapper extends BaseMapper { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduTeacherMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduTeacherMapper.java new file mode 100644 index 0000000..637612d --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduTeacherMapper.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduTeacher; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 讲师 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-21 + */ +public interface EduTeacherMapper extends BaseMapper { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduVideoMapper.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduVideoMapper.java new file mode 100644 index 0000000..64f32ea --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/EduVideoMapper.java @@ -0,0 +1,19 @@ +package com.atguigu.eduservice.mapper; + +import com.atguigu.eduservice.entity.EduVideo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 课程视频 Mapper 接口 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduVideoMapper extends BaseMapper { + + + + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduChapterMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduChapterMapper.xml new file mode 100644 index 0000000..67ddce0 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduChapterMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseCollectMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseCollectMapper.xml new file mode 100644 index 0000000..07d53b5 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseCollectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseDescriptionMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseDescriptionMapper.xml new file mode 100644 index 0000000..05f2a1d --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseDescriptionMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseMapper.xml new file mode 100644 index 0000000..08417c8 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduCourseMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduSubjectMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduSubjectMapper.xml new file mode 100644 index 0000000..d78ea33 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduSubjectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduTeacherMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduTeacherMapper.xml new file mode 100644 index 0000000..06fe55e --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduTeacherMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduVideoMapper.xml b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduVideoMapper.xml new file mode 100644 index 0000000..242b0b4 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/mapper/xml/EduVideoMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduChapterService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduChapterService.java new file mode 100644 index 0000000..4974c5b --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduChapterService.java @@ -0,0 +1,24 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduChapter; +import com.atguigu.eduservice.entity.chapter.ChapterVo; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 课程 服务类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduChapterService extends IService { + + List getChapterVideoByCourseId(String courseId); + + boolean deleteChapter(String chapterId); + + void removeChapterByCourseId(String courseId); +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseCollectService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseCollectService.java new file mode 100644 index 0000000..5162cc5 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseCollectService.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduCourseCollect; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 课程收藏 服务类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduCourseCollectService extends IService { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseDescriptionService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseDescriptionService.java new file mode 100644 index 0000000..5bf6e9b --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseDescriptionService.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduCourseDescription; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 课程简介 服务类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduCourseDescriptionService extends IService { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseService.java new file mode 100644 index 0000000..6091c89 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseService.java @@ -0,0 +1,29 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduCourse; +import com.atguigu.eduservice.entity.vo.CourseInfoVo; +import com.atguigu.eduservice.entity.vo.CoursePublishVo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 课程 服务类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduCourseService extends IService { + + //添加基本课程信息的方法 + String saveCourseInfo(CourseInfoVo courseInfoVo); + + CourseInfoVo getCourseInfo(String courseId); + + void updateCourseInfo(CourseInfoVo courseInfoVo); + + CoursePublishVo publishCourseInfo(String courseId); + + void removeCourse(String courseId); + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduSubjectService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduSubjectService.java new file mode 100644 index 0000000..84eeecf --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduSubjectService.java @@ -0,0 +1,24 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduSubject; +import com.atguigu.eduservice.entity.subject.OneSubject; +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + *

+ * 课程科目 服务类 + *

+ * + * @author Ding + * @since 2022-04-24 + */ +public interface EduSubjectService extends IService { + + void saveSubject(MultipartFile file,EduSubjectService subjectService); + + List getAllOneTwoSubject(); + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduTeacherService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduTeacherService.java new file mode 100644 index 0000000..3980d01 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduTeacherService.java @@ -0,0 +1,16 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduTeacher; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 讲师 服务类 + *

+ * + * @author Ding + * @since 2022-04-21 + */ +public interface EduTeacherService extends IService { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduVideoService.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduVideoService.java new file mode 100644 index 0000000..af341d3 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduVideoService.java @@ -0,0 +1,17 @@ +package com.atguigu.eduservice.service; + +import com.atguigu.eduservice.entity.EduVideo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 课程视频 服务类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +public interface EduVideoService extends IService { + + void removeVideoByCourseId(String courseId); +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduChapterServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduChapterServiceImpl.java new file mode 100644 index 0000000..33e0bdd --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduChapterServiceImpl.java @@ -0,0 +1,106 @@ +package com.atguigu.eduservice.service.impl; + +import com.atguigu.eduservice.entity.EduChapter; +import com.atguigu.eduservice.entity.EduVideo; +import com.atguigu.eduservice.entity.chapter.ChapterVo; +import com.atguigu.eduservice.entity.chapter.VideoVo; +import com.atguigu.eduservice.mapper.EduChapterMapper; +import com.atguigu.eduservice.service.EduChapterService; +import com.atguigu.eduservice.service.EduVideoService; +import com.atguigu.servicebase.exceptionhandler.GuliException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 课程 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Service +public class EduChapterServiceImpl extends ServiceImpl implements EduChapterService { + + //注入小结的service + @Autowired + private EduVideoService videoService; + + + @Override + public List getChapterVideoByCourseId(String courseId) { + + //1.根据课程id查询课程里面的所有章节 + QueryWrapper wrapperChapter = new QueryWrapper<>(); + wrapperChapter.eq("course_Id", courseId); + List eduChapterList = baseMapper.selectList(wrapperChapter); + + //2.根据课程id查询课程里面的所有小结 + QueryWrapper wrapperVideo = new QueryWrapper<>(); + wrapperChapter.eq("course_Id", courseId); + List eduVideoList = videoService.list(wrapperVideo); + + //创建list集合,用于最终封装数据 + List finalList = new ArrayList<>(); + + //3.遍历查询章节list集合进行封装 + //遍历查询章节list集合 + for (EduChapter eduChapter : eduChapterList) { + //把每个章节放入到chapterVo当中 + ChapterVo chapterVo = new ChapterVo(); + BeanUtils.copyProperties(eduChapter, chapterVo); + //放入最终的list集合 + finalList.add(chapterVo); + + //创建一个list用于封装章节里面的小结 + List videoList = new ArrayList<>(); + + //4.遍历查询小结list集合,进行封装 + for (EduVideo eduVideo : eduVideoList) { + + if (eduVideo.getChapterId().equals(eduChapter.getId())) { + VideoVo videoVo = new VideoVo(); + BeanUtils.copyProperties(eduVideo, videoVo); + videoList.add(videoVo); + } + } + //把封装之后的小结list集合,放到章节对象里面去 + chapterVo.setChildren(videoList); + } + + return finalList; + } + + //删除章节的方法 + @Override + public boolean deleteChapter(String chapterId) { + + //根据chapterId查询小结表,如果能查询出数据,就不进行删除 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("chapter_id", chapterId); + + int count = videoService.count(queryWrapper); + + if (count > 0) { + //能查询出小结,不进行删除 + throw new GuliException(20001, "该章节中存在小结,无法删除"); + } else { + int result = baseMapper.deleteById(chapterId); + return result > 0; + } + + } + + @Override + public void removeChapterByCourseId(String courseId) { + QueryWrapper chapterQueryWrapper = new QueryWrapper<>(); + chapterQueryWrapper.eq("course_id", courseId); + baseMapper.delete(chapterQueryWrapper); + } +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseCollectServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseCollectServiceImpl.java new file mode 100644 index 0000000..1649c0b --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseCollectServiceImpl.java @@ -0,0 +1,20 @@ +package com.atguigu.eduservice.service.impl; + +import com.atguigu.eduservice.entity.EduCourseCollect; +import com.atguigu.eduservice.mapper.EduCourseCollectMapper; +import com.atguigu.eduservice.service.EduCourseCollectService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 课程收藏 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Service +public class EduCourseCollectServiceImpl extends ServiceImpl implements EduCourseCollectService { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseDescriptionServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseDescriptionServiceImpl.java new file mode 100644 index 0000000..8529b8a --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseDescriptionServiceImpl.java @@ -0,0 +1,20 @@ +package com.atguigu.eduservice.service.impl; + +import com.atguigu.eduservice.entity.EduCourseDescription; +import com.atguigu.eduservice.mapper.EduCourseDescriptionMapper; +import com.atguigu.eduservice.service.EduCourseDescriptionService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 课程简介 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Service +public class EduCourseDescriptionServiceImpl extends ServiceImpl implements EduCourseDescriptionService { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseServiceImpl.java new file mode 100644 index 0000000..8937247 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduCourseServiceImpl.java @@ -0,0 +1,141 @@ +package com.atguigu.eduservice.service.impl; + +import com.atguigu.eduservice.entity.EduChapter; +import com.atguigu.eduservice.entity.EduCourse; +import com.atguigu.eduservice.entity.EduCourseDescription; +import com.atguigu.eduservice.entity.EduVideo; +import com.atguigu.eduservice.entity.vo.CourseInfoVo; +import com.atguigu.eduservice.entity.vo.CoursePublishVo; +import com.atguigu.eduservice.mapper.EduCourseMapper; +import com.atguigu.eduservice.service.EduChapterService; +import com.atguigu.eduservice.service.EduCourseDescriptionService; +import com.atguigu.eduservice.service.EduCourseService; +import com.atguigu.eduservice.service.EduVideoService; +import com.atguigu.servicebase.exceptionhandler.GuliException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + *

+ * 课程 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Service +public class EduCourseServiceImpl extends ServiceImpl implements EduCourseService { + + //注入描述的service + @Autowired + private EduCourseDescriptionService courseDescriptionService; + + //注入章节和小结的service + @Autowired + private EduVideoService videoService; + + @Autowired + private EduChapterService chapterService; + + + //添加课程信息的方法 + @Override + public String saveCourseInfo(CourseInfoVo courseInfoVo) { + //1 向课程表添加客户才能基本信息 + //将CourseInfoVo对象转换为eduCourse对象 + EduCourse eduCourse = new EduCourse(); + BeanUtils.copyProperties(courseInfoVo, eduCourse); + int insert = baseMapper.insert(eduCourse); + + if (insert == 0) { + //添加课程失败 + throw new GuliException(20001, "添加课程信息失败"); + } + + //获取添加成功之后的课程id + String cid = eduCourse.getId(); + + + //2 向课程简介表添加课程简介 + EduCourseDescription eduCourseDescription = new EduCourseDescription(); + eduCourseDescription.setDescription(courseInfoVo.getDescription()); + eduCourseDescription.setId(cid); +// BeanUtils.copyProperties(courseInfoVo,eduCourseDescription); + courseDescriptionService.save(eduCourseDescription); + + return cid; + } + + @Override + public CourseInfoVo getCourseInfo(String courseId) { + + //1.根据课程id查询课程表 + EduCourse eduCourse = baseMapper.selectById(courseId); + CourseInfoVo courseInfoVo = new CourseInfoVo(); + + //2.查询描述表 + EduCourseDescription courseDescription = courseDescriptionService.getById(courseId); + + //赋值 + BeanUtils.copyProperties(eduCourse, courseInfoVo); + courseInfoVo.setDescription(courseDescription.getDescription()); + + + return courseInfoVo; + + + } + + @Override + public void updateCourseInfo(CourseInfoVo courseInfoVo) { + + //1.修改课程表 + EduCourse eduCourse = new EduCourse(); + + BeanUtils.copyProperties(courseInfoVo, eduCourse); + + int update = baseMapper.updateById(eduCourse); + + if (update == 0) { + throw new GuliException(20001, "修改课程信息失败"); + } + + //2.修改描述表 + EduCourseDescription eduCourseDescription = new EduCourseDescription(); + BeanUtils.copyProperties(courseInfoVo, eduCourseDescription); + courseDescriptionService.updateById(eduCourseDescription); + + } + + @Override + public CoursePublishVo publishCourseInfo(String courseId) { + + CoursePublishVo publishCourseInfo = baseMapper.getPublishCourseInfo(courseId); + return publishCourseInfo; + } + + //删除课程 + @Override + public void removeCourse(String courseId) { + + //1.根据课程id删除小结 + videoService.removeVideoByCourseId(courseId); + //2.根据课程id删除章节 + chapterService.removeChapterByCourseId(courseId); + + //3.根据课程id删除描述 + courseDescriptionService.removeById(courseId); + + //4.根据课程id删除本身 + int result = baseMapper.deleteById(courseId); + + if (result == 0) { + throw new GuliException(20001, "删除课程失败"); + } + + + } +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduSubjectServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduSubjectServiceImpl.java new file mode 100644 index 0000000..a8756be --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduSubjectServiceImpl.java @@ -0,0 +1,109 @@ +package com.atguigu.eduservice.service.impl; + +import com.alibaba.excel.EasyExcel; +import com.atguigu.eduservice.entity.EduSubject; +import com.atguigu.eduservice.entity.excel.SubjectData; +import com.atguigu.eduservice.entity.subject.OneSubject; +import com.atguigu.eduservice.entity.subject.TwoSubject; +import com.atguigu.eduservice.listener.SubjectExcelListener; +import com.atguigu.eduservice.mapper.EduSubjectMapper; +import com.atguigu.eduservice.service.EduSubjectService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fasterxml.jackson.databind.util.BeanUtil; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 课程科目 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-24 + */ +@Service +public class EduSubjectServiceImpl extends ServiceImpl implements EduSubjectService { + + //添加课程分类 + @Override + public void saveSubject(MultipartFile file,EduSubjectService subjectService) { + + try{ + + //文件输入流 + InputStream in=file.getInputStream(); + //TODO 这里不需要controller传入service,直接使用this关键字即可获取 + EasyExcel.read(in, SubjectData.class,new SubjectExcelListener(subjectService)).sheet().doRead(); + + }catch (Exception e){ + + System.out.println(e.getMessage()); + + } + + + + + + + } + + @Override + public List getAllOneTwoSubject() { + + //1.查询所有的一级分类 + QueryWrapper wrapperOne=new QueryWrapper<>(); + wrapperOne.eq("parent_id","0"); + List oneSubjectList = baseMapper.selectList(wrapperOne); + + //2.查询所有的二级分类 + QueryWrapper wrapperTwo=new QueryWrapper<>(); + wrapperTwo.ne("parent_id","0"); + List twoSubjectList = baseMapper.selectList(wrapperTwo); + + + //创建一个list集合,用于存储最终封装数据 + List finalSubjectList =new ArrayList<>(); + + //3.封装一级分类 + //查询出来所有的依据及分类list集合遍历,得到每个一级分类对象,获取每一个一级分类对象 + for (EduSubject eduSubject : oneSubjectList) { + //eduSubject的值放到oneSubject + OneSubject oneSubject = new OneSubject(); +// oneSubject.setId(eduSubject.getId()); +// oneSubject.setTitle(eduSubject.getTitle()); + //简化方式 + BeanUtils.copyProperties(eduSubject,oneSubject); + + + //在一级分类玄幻遍历查询所有的二级分类 + //创建list集合封装每一个一级分类的二级分类 + //4.封装二级分类 + List twoFinalSubjectList =new ArrayList<>(); + //遍历耳机分类list集合 + for (EduSubject subject : twoSubjectList) { + TwoSubject twoSubject = new TwoSubject(); + if(subject.getParentId().equals(oneSubject.getId())){ + BeanUtils.copyProperties(subject,twoSubject); + twoFinalSubjectList.add(twoSubject); + } + } + + + oneSubject.setChildren(twoFinalSubjectList); + + finalSubjectList.add(oneSubject); + + + + } + + return finalSubjectList; + } +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduTeacherServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduTeacherServiceImpl.java new file mode 100644 index 0000000..22552e6 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduTeacherServiceImpl.java @@ -0,0 +1,20 @@ +package com.atguigu.eduservice.service.impl; + +import com.atguigu.eduservice.entity.EduTeacher; +import com.atguigu.eduservice.mapper.EduTeacherMapper; +import com.atguigu.eduservice.service.EduTeacherService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 讲师 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-21 + */ +@Service +public class EduTeacherServiceImpl extends ServiceImpl implements EduTeacherService { + +} diff --git a/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduVideoServiceImpl.java b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduVideoServiceImpl.java new file mode 100644 index 0000000..b574b28 --- /dev/null +++ b/guli_parent/service/service_edu/src/main/java/com/atguigu/eduservice/service/impl/EduVideoServiceImpl.java @@ -0,0 +1,29 @@ +package com.atguigu.eduservice.service.impl; + +import com.atguigu.eduservice.entity.EduVideo; +import com.atguigu.eduservice.mapper.EduVideoMapper; +import com.atguigu.eduservice.service.EduVideoService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 课程视频 服务实现类 + *

+ * + * @author Ding + * @since 2022-04-25 + */ +@Service +public class EduVideoServiceImpl extends ServiceImpl implements EduVideoService { + + @Override + public void removeVideoByCourseId(String courseId) { + + QueryWrapper videoQueryWrapper =new QueryWrapper<>(); + videoQueryWrapper.eq("course_id",courseId); + baseMapper.delete(videoQueryWrapper); + + } +} diff --git a/guli_parent/service/service_edu/src/main/resources/application-dev.yml b/guli_parent/service/service_edu/src/main/resources/application-dev.yml new file mode 100644 index 0000000..50de8eb --- /dev/null +++ b/guli_parent/service/service_edu/src/main/resources/application-dev.yml @@ -0,0 +1,33 @@ +# 服务端口 +server: + port: 8001 + +#服务名 +spring: + application: + name: service-edu + #环境设置:dev test prod + profiles: + active: dev + # mysql数据库连接 + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/guli?useSSL=false&requireSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # 这里比讲解多配制了编码格式,将市区改为Asia/Shanghai后访问成功 + username: root + password: root + #配置json的全局时间格式 + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + +# mybatis日志 +#mybatis-plus: +# configuration: +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl +mybatis-plus: + mapper-locations: classpath*:com/atguigu/eduservice/mapper.xml/*.xml + +## 设置日志级别 +#logging: +# level: +# root: INFO diff --git a/guli_parent/service/service_edu/src/main/resources/logback-spring.xml b/guli_parent/service/service_edu/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..ea83bde --- /dev/null +++ b/guli_parent/service/service_edu/src/main/resources/logback-spring.xml @@ -0,0 +1,164 @@ + + + + + + + + logback + + + + + + + + + + + + + + + + + + + INFO + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + + + ${log.path}/log_info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + INFO + ACCEPT + DENY + + + + + + + ${log.path}/log_warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + + ${log.path}/log_error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/CodeGenerator.java b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/CodeGenerator.java new file mode 100644 index 0000000..43cb08e --- /dev/null +++ b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/CodeGenerator.java @@ -0,0 +1,81 @@ +package com.atguigu.generater; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.config.DataSourceConfig; +import com.baomidou.mybatisplus.generator.config.GlobalConfig; +import com.baomidou.mybatisplus.generator.config.PackageConfig; +import com.baomidou.mybatisplus.generator.config.StrategyConfig; +import com.baomidou.mybatisplus.generator.config.rules.DateType; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import org.junit.Test; + +/** + * @author + * @since 2018/12/13 + */ +public class CodeGenerator { + + @Test + public void run() { + + // 1、创建代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 2、全局配置 + GlobalConfig gc = new GlobalConfig(); + String projectPath = System.getProperty("user.dir"); + gc.setOutputDir("E:\\self_example\\guli_parent\\service\\service_edu" + "/src/main/java"); + + gc.setAuthor("Ding"); + gc.setOpen(false); //生成后是否打开资源管理器 + gc.setFileOverride(false); //重新生成时文件是否覆盖 + + gc.setServiceName("%sService"); //去掉Service接口的首字母I + + gc.setIdType(IdType.ID_WORKER_STR); //主键策略 + gc.setDateType(DateType.ONLY_DATE);//定义生成的实体类中日期类型 + gc.setSwagger2(true);//开启Swagger2模式 + + mpg.setGlobalConfig(gc); + + // 3、数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setDriverName("com.mysql.cj.jdbc.Driver"); + //TODO 这里的时区经常报错包括G开头的和UTC都会报错,这里改为Asia/Shanghai后不报错 + dsc.setUrl("jdbc:mysql://localhost:3306/guli?useSSL=false&requireSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai"); + dsc.setUsername("root"); + dsc.setPassword("root"); + dsc.setDbType(DbType.MYSQL); + mpg.setDataSource(dsc); + + // 4、包配置 + PackageConfig pc = new PackageConfig(); + pc.setModuleName("eduservice"); //模块名 + pc.setParent("com.atguigu"); + pc.setController("controller"); + pc.setEntity("entity"); + pc.setService("service"); + pc.setMapper("mapper"); + mpg.setPackageInfo(pc); + + // 5、策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setInclude("edu_course_description","edu_course_collect","edu_chapter","edu_course","edu_video"); + strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 + strategy.setTablePrefix(pc.getModuleName() + "_"); //生成实体时去掉表前缀 + + strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略 + strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作 + + strategy.setRestControllerStyle(true); //restful api风格控制器 + strategy.setControllerMappingHyphenStyle(true); //url中驼峰转连字符 + + mpg.setStrategy(strategy); + + + // 6、执行 + mpg.execute(); + } +} diff --git a/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/DemoData.java b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/DemoData.java new file mode 100644 index 0000000..ab1d623 --- /dev/null +++ b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/DemoData.java @@ -0,0 +1,17 @@ +package com.atguigu.generater.excel.read; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +//1.创建与excel对应的实体类 +@Data +public class DemoData { + + //设置excel表头名称 index=0,表示excel中的第一行 + @ExcelProperty(value = "学生编码",index = 0) + private Integer sno; + + @ExcelProperty(value = "学生姓名",index = 1) + private String sname; + +} diff --git a/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/ExcelListener.java b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/ExcelListener.java new file mode 100644 index 0000000..7107fbb --- /dev/null +++ b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/ExcelListener.java @@ -0,0 +1,31 @@ +package com.atguigu.generater.excel.read; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; + +import java.util.Map; + +//2.创建监听类,进行excel文件的读取 +public class ExcelListener extends AnalysisEventListener { + + //一行一行读取excel内容,除了表头 + @Override + public void invoke(DemoData demoData, AnalysisContext analysisContext) { + + System.out.println("****"+demoData); + } + + //读取表头内容 + @Override + public void invokeHeadMap(Map headMap, AnalysisContext context) { + + System.out.println("表头:"+headMap); + + } + + //读取完成之后 + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + + } +} diff --git a/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/TestEasyExcel.java b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/TestEasyExcel.java new file mode 100644 index 0000000..1b6b2af --- /dev/null +++ b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/read/TestEasyExcel.java @@ -0,0 +1,43 @@ +package com.atguigu.generater.excel.read; + +import com.alibaba.excel.EasyExcel; + +import java.util.ArrayList; +import java.util.List; + +public class TestEasyExcel { + + + public static void main(String[] args) { + + //实现excel读的操作 + + //1.设置读取文件夹地址和excel文件的名称 + String filename="F:\\java_spring\\第5阶段—企业级项目实战\\在线教育--谷粒学院\\项目资料\\self_resource\\write.xlsx"; + + //2.调用easyExcel里面的方法实现写操作 + //TODO write方法中两个参数:第一个参数文件的路径名称,第二个参数实体类的class,第三个是Listener监听器 + EasyExcel.read(filename,DemoData.class,new ExcelListener()).sheet().doRead(); + + + } + + /** + * 创建方法返回list集合 + */ + private static List getData(){ + + List list =new ArrayList<>(); + + for (int i = 0; i < 10; i++) { + DemoData data=new DemoData(); + data.setSno(i); + data.setSname("lucy"+i); + list.add(data); + } + return list; + } + + + +} diff --git a/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/write/DemoData.java b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/write/DemoData.java new file mode 100644 index 0000000..aeadf2c --- /dev/null +++ b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/write/DemoData.java @@ -0,0 +1,17 @@ +package com.atguigu.generater.excel.write; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + + +@Data +public class DemoData { + + //设置excel表头名称 + @ExcelProperty(value = "学生编码") + private Integer sno; + + @ExcelProperty(value = "学生姓名") + private String sname; + +} diff --git a/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/write/TestEasyExcel.java b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/write/TestEasyExcel.java new file mode 100644 index 0000000..844d400 --- /dev/null +++ b/guli_parent/service/service_edu/src/test/java/com/atguigu/generater/excel/write/TestEasyExcel.java @@ -0,0 +1,43 @@ +package com.atguigu.generater.excel.write; + +import com.alibaba.excel.EasyExcel; + +import java.util.ArrayList; +import java.util.List; + +public class TestEasyExcel { + + + public static void main(String[] args) { + + //实现excel写的操作 + + //1.设置写入文件夹地址和excel文件的名称 + String filename="F:\\java_spring\\第5阶段—企业级项目实战\\在线教育--谷粒学院\\项目资料\\self_resource\\write.xlsx"; + + //2.调用easyExcel里面的方法实现写操作 + //TODO write方法中两个参数:第一个参数文件的路径名称,第二个参数实体类的class + EasyExcel.write(filename,DemoData.class).sheet("学生列表").doWrite(getData()); + + + } + + /** + * 创建方法返回list集合 + */ + private static List getData(){ + + List list =new ArrayList<>(); + + for (int i = 0; i < 10; i++) { + DemoData data=new DemoData(); + data.setSno(i); + data.setSname("lucy"+i); + list.add(data); + } + return list; + } + + + +} diff --git a/guli_parent/service/service_oss/pom.xml b/guli_parent/service/service_oss/pom.xml new file mode 100644 index 0000000..b6d4351 --- /dev/null +++ b/guli_parent/service/service_oss/pom.xml @@ -0,0 +1,28 @@ + + + + service + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + service_oss + + + + com.aliyun.oss + aliyun-sdk-oss + + + + + joda-time + joda-time + + + + + \ No newline at end of file diff --git a/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/OssApplication.java b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/OssApplication.java new file mode 100644 index 0000000..0d7a433 --- /dev/null +++ b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/OssApplication.java @@ -0,0 +1,20 @@ +package com.atguigu.oss; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; + +//TODO 在启动类添加属性,默认不去加载数据库配置(否则启动失败) +//TODO 如果在这里使用了德鲁伊连接池,还需要增加DruidDataSourceAutoConfiguration.class +@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@ComponentScan(basePackages = {"com.atguigu"}) +public class OssApplication { + + public static void main(String[] args) { + SpringApplication.run(OssApplication.class,args); + } + + +} diff --git a/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/controller/OssController.java b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/controller/OssController.java new file mode 100644 index 0000000..ed19bfe --- /dev/null +++ b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/controller/OssController.java @@ -0,0 +1,34 @@ +package com.atguigu.oss.controller; + + +import com.atguigu.commonutils.R; +import com.atguigu.oss.service.OssService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +@RestController +@RequestMapping("/eduoss/fileoss") +@CrossOrigin +public class OssController { + + @Autowired + private OssService ossService; + + //上传头像的方法 + @PostMapping + public R uploadOssFile(MultipartFile file){ + //获取上传文件 MultipartFile + //方法返回上传到oss的路径,将路径存储到数据库中 + String url = ossService.uploadFileAvatar(file); + + + return R.ok().data("url",url); + } + + + +} diff --git a/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/service/OssService.java b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/service/OssService.java new file mode 100644 index 0000000..6eb9771 --- /dev/null +++ b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/service/OssService.java @@ -0,0 +1,8 @@ +package com.atguigu.oss.service; + +import org.springframework.web.multipart.MultipartFile; + +public interface OssService { + //上传文件到oss + String uploadFileAvatar(MultipartFile file); +} diff --git a/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/service/impl/OssServiceImpl.java b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/service/impl/OssServiceImpl.java new file mode 100644 index 0000000..9ca49e4 --- /dev/null +++ b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/service/impl/OssServiceImpl.java @@ -0,0 +1,75 @@ +package com.atguigu.oss.service.impl; + +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.atguigu.oss.service.OssService; +import com.atguigu.oss.utils.ConstantPropertiesUtil; +import org.joda.time.DateTime; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.InputStream; +import java.util.UUID; + +@Service +public class OssServiceImpl implements OssService { + + //上传文件到oss + @Override + public String uploadFileAvatar(MultipartFile file) { + // Endpoint以华东1(杭州)为例,其它Region请按实际情况填写。 + String endpoint = ConstantPropertiesUtil.END_POINT; + // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。 + String accessKeyId = ConstantPropertiesUtil.ACCESS_KEY_ID; + String accessKeySecret = ConstantPropertiesUtil.ACCESS_KEY_SECRET; + // 填写Bucket名称,例如examplebucket。 + String bucketName = ConstantPropertiesUtil.BUCKET_NAME; + + // 创建OSSClient实例。 + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); + String url = null; + + + try { + + //获取上传文件输入流 + InputStream inputStream = file.getInputStream(); + //获取文件名称 + String filename = file.getOriginalFilename(); + + //TODO 由于每个人上传的文件名称都有可能相同,因为有可能会存在覆盖问题,所以在文件名后面添加随机唯一的值UUID + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + filename = uuid + filename; + + // 创建oss方法实现上传。 + //第一个参数bucket名称;第二个参数 上传到oss文件路径和文件名称 aa/bb/1.jpg;第三个是输入流 + + //TODO 为了以后便于区分和管理,可以按照文件按日期进行分类,添加到对应的文件夹 + //使用工具类获取当前时间 + String datePath = new DateTime().toString("yyyy/MM/dd"); + filename = datePath +"/"+ filename; + + ossClient.putObject(bucketName, filename, inputStream); + + //上传文件之后文件路径返回 + //需要把上传到阿里云oss路径手动拼接出来 + //https://edu-markilue.oss-cn-beijing.aliyuncs.com/dog.jpg + url = "http://" + bucketName + "." + endpoint + "/" + filename; + + + } catch (Exception e) { + System.out.println("http://" + bucketName + "." + endpoint + "/" + "dog.jpg"); + System.out.println("Caught an OSSException, which means your request made it to OSS, " + + "but was rejected with an error response for some reason."); + System.out.println(e.getMessage()); + + + } finally { + if (ossClient != null) { + ossClient.shutdown(); + } + } + return url; + + } +} diff --git a/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/utils/ConstantPropertiesUtil.java b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/utils/ConstantPropertiesUtil.java new file mode 100644 index 0000000..a516f0f --- /dev/null +++ b/guli_parent/service/service_oss/src/main/java/com/atguigu/oss/utils/ConstantPropertiesUtil.java @@ -0,0 +1,43 @@ +package com.atguigu.oss.utils; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + + +//当项目启动,spring有一个接口,当spring一启动就可以加载,执行接口InitializingBean的一个方法 +@Component +public class ConstantPropertiesUtil implements InitializingBean { + + //读取配置文件内容 + @Value("${aliyun.oss.file.endpoint}") + private String endpoint; + + @Value("${aliyun.oss.file.keyid}") + private String keyId; + + @Value("${aliyun.oss.file.keysecret}") + private String keySecret; + + @Value("${aliyun.oss.file.bucketname}") + private String bucketName; + + + //定义公开静态常量 + public static String END_POINT; + public static String ACCESS_KEY_ID; + public static String ACCESS_KEY_SECRET; + public static String BUCKET_NAME; + + + + + //当把类上面的属性都初始化之后,这个方法会被执行 + @Override + public void afterPropertiesSet() throws Exception { + END_POINT=endpoint; + ACCESS_KEY_ID = keyId; + ACCESS_KEY_SECRET = keySecret; + BUCKET_NAME = bucketName; + } +} diff --git a/guli_parent/service/service_oss/src/main/resources/application-dev.yml b/guli_parent/service/service_oss/src/main/resources/application-dev.yml new file mode 100644 index 0000000..f3bd431 --- /dev/null +++ b/guli_parent/service/service_oss/src/main/resources/application-dev.yml @@ -0,0 +1,19 @@ +#服务端口 +server: + port: 8002 +#服务名 +spring: + application: + name: service-oss + #环境配置 + profiles: + active: dev + +#阿里云 OSS +aliyun: + oss: + file: + endpoint: oss-cn-beijing.aliyuncs.com + keyid: LTAI5t7N46mP1ywxuZoV8i4q + keysecret: vQuZZOflAcgbTNls0oZJRTOqW6Pobe + bucketname: edu-markilue diff --git a/guli_parent/service/service_vod/pom.xml b/guli_parent/service/service_vod/pom.xml new file mode 100644 index 0000000..73053e4 --- /dev/null +++ b/guli_parent/service/service_vod/pom.xml @@ -0,0 +1,69 @@ + + + + service + com.atguigu + 0.0.1-SNAPSHOT + + 4.0.0 + + service_vod + + + + + + + com.aliyun + aliyun-java-sdk-core + + + + com.aliyun.oss + aliyun-sdk-oss + + + com.aliyun + aliyun-java-sdk-vod + + + + com.aliyun + aliyun-sdk-vod-upload + + + com.alibaba + fastjson + + + + org.json + json + + + com.google.code.gson + gson + + + + joda-time + joda-time + + + com.aliyun + aliyun-java-sdk-kms + 2.10.1 + + + + + \ No newline at end of file diff --git a/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/VodApplication.java b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/VodApplication.java new file mode 100644 index 0000000..f9a66a3 --- /dev/null +++ b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/VodApplication.java @@ -0,0 +1,16 @@ +package com.atguigu.vod; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@ComponentScan(basePackages = {"com.atguigu"}) +public class VodApplication { + + public static void main(String[] args) { + + SpringApplication.run(VodApplication.class); + } +} diff --git a/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/controller/VodController.java b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/controller/VodController.java new file mode 100644 index 0000000..0d0eec8 --- /dev/null +++ b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/controller/VodController.java @@ -0,0 +1,61 @@ +package com.atguigu.vod.controller; + +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.vod.model.v20170321.DeleteVideoRequest; +import com.atguigu.commonutils.R; +import com.atguigu.servicebase.exceptionhandler.GuliException; +import com.atguigu.vod.service.VodService; +import com.atguigu.vod.utils.ConstantVodUtils; +import com.atguigu.vod.utils.InitVodClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +@RestController +@RequestMapping("/eduvod/video") +@CrossOrigin +public class VodController { + + + @Autowired + private VodService vodService; + + + //上传视频到阿里云 + @PostMapping("uploadAlyVideo") + public R uploadAlyVideo(MultipartFile file){ + + //返回上传视频的id值 + String videoId=vodService.uploadAlyVideo(file); + + return R.ok().data("videoId",videoId); + + } + + //根据视屏id删除阿里云视频 + @DeleteMapping("{id}") + public R removeAlyVideo(@PathVariable String id){ + + try{ + //初始化client对象 + DefaultAcsClient client = InitVodClient.initVodClient(ConstantVodUtils.ACCESS_KEY_ID, ConstantVodUtils.ACCESS_KEY_SECRET); + //创建删除视频的request对象 + DeleteVideoRequest request = new DeleteVideoRequest(); + //向request中设置videoId + request.setVideoIds(id); + + //调用初始化对象的方法,实现删除 + client.getAcsResponse(request); //也可以返回response,但这里没有什么用 + return R.ok(); + + }catch (Exception e){ + e.printStackTrace(); + throw new GuliException(20001,"删除视频失败"); + + } + + + } + + +} diff --git a/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/service/VodService.java b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/service/VodService.java new file mode 100644 index 0000000..c94bac6 --- /dev/null +++ b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/service/VodService.java @@ -0,0 +1,9 @@ +package com.atguigu.vod.service; + +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + + +public interface VodService { + String uploadAlyVideo(MultipartFile file); +} diff --git a/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/service/impl/VodServiceImpl.java b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/service/impl/VodServiceImpl.java new file mode 100644 index 0000000..90bb7e5 --- /dev/null +++ b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/service/impl/VodServiceImpl.java @@ -0,0 +1,56 @@ +package com.atguigu.vod.service.impl; + +import com.aliyun.vod.upload.impl.UploadVideoImpl; +import com.aliyun.vod.upload.req.UploadStreamRequest; +import com.aliyun.vod.upload.resp.UploadStreamResponse; +import com.atguigu.vod.service.VodService; +import com.atguigu.vod.utils.ConstantVodUtils; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; + +@Service +public class VodServiceImpl implements VodService { + @Override + public String uploadAlyVideo(MultipartFile file) { + + + try { + //accessKeySecret=""; //id + //accessKeyId=""; //秘钥 + + String fileName=file.getOriginalFilename(); //上传文件的原始名称 + //fileName.lastIndexOf(".")得到最后一个.的位置 + String title = fileName.substring(0, fileName.lastIndexOf(".")); //阿里云上的名称 + InputStream inputStream= null; //上传文件的输入流 + inputStream = file.getInputStream(); + //TODO 采用demo中的流式上传demo复制 + UploadStreamRequest request = new UploadStreamRequest(ConstantVodUtils.ACCESS_KEY_ID, ConstantVodUtils.ACCESS_KEY_SECRET, title, fileName, inputStream); + + UploadVideoImpl uploader = new UploadVideoImpl(); + UploadStreamResponse response = uploader.uploadStream(request); + + String videoId=null; + + System.out.print("RequestId=" + response.getRequestId() + "\n"); //请求视频点播服务的请求ID + if (response.isSuccess()) { + videoId=response.getVideoId() ; + + } else { //如果设置回调URL无效,不影响视频上传,可以返回VideoId同时会返回错误码。其他情况上传失败时,VideoId为空,此时需要根据返回错误码分析具体错误原因 + videoId=response.getVideoId() ; + } + + return videoId; + } catch (IOException e) { + e.printStackTrace(); + return null; + } + + + + + + } +} diff --git a/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/utils/ConstantVodUtils.java b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/utils/ConstantVodUtils.java new file mode 100644 index 0000000..da6221d --- /dev/null +++ b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/utils/ConstantVodUtils.java @@ -0,0 +1,28 @@ +package com.atguigu.vod.utils; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + + +//当项目启动,spring有一个接口,当spring一启动就可以加载,执行接口InitializingBean的一个方法 +@Component +public class ConstantVodUtils implements InitializingBean { + + @Value("${aliyun.vod.file.keyid}") + private String keyid; + + @Value("${aliyun.vod.file.keysecret}") + private String keysecret; + + + //定义公开静态常量 + public static String ACCESS_KEY_ID; + public static String ACCESS_KEY_SECRET; + + @Override + public void afterPropertiesSet() throws Exception { + ACCESS_KEY_ID=keyid; + ACCESS_KEY_SECRET=keysecret; + } +} diff --git a/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/utils/InitVodClient.java b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/utils/InitVodClient.java new file mode 100644 index 0000000..bfe7565 --- /dev/null +++ b/guli_parent/service/service_vod/src/main/java/com/atguigu/vod/utils/InitVodClient.java @@ -0,0 +1,18 @@ +package com.atguigu.vod.utils; + +import com.aliyun.oss.ClientException; +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.profile.DefaultProfile; + + +public class InitVodClient { + + //填入AccessKey信息 初始化 + public static DefaultAcsClient initVodClient(String accessKeyId, String accessKeySecret) throws ClientException { + String regionId = "cn-shanghai"; // 点播服务接入地域 + DefaultProfile profile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret); + DefaultAcsClient client = new DefaultAcsClient(profile); + return client; + } + +} diff --git a/guli_parent/service/service_vod/src/main/resources/application-dev.yml b/guli_parent/service/service_vod/src/main/resources/application-dev.yml new file mode 100644 index 0000000..ed796c5 --- /dev/null +++ b/guli_parent/service/service_vod/src/main/resources/application-dev.yml @@ -0,0 +1,24 @@ +#服务端口 +server: + port: 8003 +#服务名 +spring: + application: + name: service-vod + #环境配置 + profiles: + active: dev + # # 最大上传单个文件大小:默认1M,不加上传会报错 + servlet: + multipart: + max-file-size: 1024MB + # 最大置总上传的数据大小 :默认10M + max-request-size: 1024MB + +#阿里云 vod 视频上传 +aliyun: + vod: + file: + keyid: LTAI5t7N46mP1ywxuZoV8i4q + keysecret: vQuZZOflAcgbTNls0oZJRTOqW6Pobe + diff --git a/guli_parent/service/service_vod/src/test/java/com/atguigu/vodtest/InitObject.java b/guli_parent/service/service_vod/src/test/java/com/atguigu/vodtest/InitObject.java new file mode 100644 index 0000000..e05bf82 --- /dev/null +++ b/guli_parent/service/service_vod/src/test/java/com/atguigu/vodtest/InitObject.java @@ -0,0 +1,18 @@ +package com.atguigu.vodtest; + +import com.aliyun.oss.ClientException; +import com.aliyuncs.profile.DefaultProfile; +import com.aliyuncs.DefaultAcsClient; + + +public class InitObject { + + //填入AccessKey信息 初始化 + public static DefaultAcsClient initVodClient(String accessKeyId, String accessKeySecret) throws ClientException { + String regionId = "cn-shanghai"; // 点播服务接入地域 + DefaultProfile profile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret); + DefaultAcsClient client = new DefaultAcsClient(profile); + return client; + } + +} diff --git a/guli_parent/service/service_vod/src/test/java/com/atguigu/vodtest/TestVod.java b/guli_parent/service/service_vod/src/test/java/com/atguigu/vodtest/TestVod.java new file mode 100644 index 0000000..6afb1a0 --- /dev/null +++ b/guli_parent/service/service_vod/src/test/java/com/atguigu/vodtest/TestVod.java @@ -0,0 +1,94 @@ +package com.atguigu.vodtest; + +import com.aliyun.vod.upload.impl.UploadVideoImpl; +import com.aliyun.vod.upload.req.UploadVideoRequest; +import com.aliyun.vod.upload.resp.UploadVideoResponse; +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.exceptions.ClientException; +import com.aliyuncs.vod.model.v20170321.GetPlayInfoRequest; +import com.aliyuncs.vod.model.v20170321.GetPlayInfoResponse; +import com.aliyuncs.vod.model.v20170321.GetVideoPlayAuthRequest; +import com.aliyuncs.vod.model.v20170321.GetVideoPlayAuthResponse; + +import java.util.List; + +public class TestVod { + + + public static void main(String[] args) throws Exception { + + String accessKeyId="LTAI5t7N46mP1ywxuZoV8i4q"; //oss的id + String accessKeySecret="vQuZZOflAcgbTNls0oZJRTOqW6Pobe"; //oss的秘钥 + String title="6 - What If I Want to Move Faster.mp4"; //上传之后文件的名称(在阿里云中显示的名称) + String fileName="F:\\java_spring\\第5阶段—企业级项目实战\\在线教育--谷粒学院\\项目资料\\1-阿里云上传测试视频\\6 - What If I Want to Move Faster.mp4"; //本地文件的路径名称 + + //TODO 3.上传视频的方法,复制官方示例 -->本地文件上传接口 + UploadVideoRequest request = new UploadVideoRequest(accessKeyId, accessKeySecret, title, fileName); + /* 可指定分片上传时每个分片的大小,默认为2M字节 */ + request.setPartSize(2 * 1024 * 1024L); + /* 可指定分片上传时的并发线程数,默认为1,(注:该配置会占用服务器CPU资源,需根据服务器情况指定)*/ + request.setTaskNum(1); + + UploadVideoImpl uploader = new UploadVideoImpl(); + UploadVideoResponse response = uploader.uploadVideo(request); + System.out.print("RequestId=" + response.getRequestId() + "\n"); //请求视频点播服务的请求ID + if (response.isSuccess()) { + System.out.print("VideoId=" + response.getVideoId() + "\n"); //这里的videoId就是上传以后视频的id + } else { + /* 如果设置回调URL无效,不影响视频上传,可以返回VideoId同时会返回错误码。其他情况上传失败时,VideoId为空,此时需要根据返回错误码分析具体错误原因 */ + System.out.print("VideoId=" + response.getVideoId() + "\n"); + System.out.print("ErrorCode=" + response.getCode() + "\n"); + System.out.print("ErrorMessage=" + response.getMessage() + "\n"); + } + + } + + + public static void getPlayAuth() throws Exception{ + //TODO 2.根据视频ID获取视频播放凭证 -->适用于加密视频 + + //创建一个初始化对象 + DefaultAcsClient client = InitObject.initVodClient("LTAI5t7N46mP1ywxuZoV8i4q", "vQuZZOflAcgbTNls0oZJRTOqW6Pobe"); + + //创建获取视频凭证的request和response + GetVideoPlayAuthRequest request = new GetVideoPlayAuthRequest(); + GetVideoPlayAuthResponse response = new GetVideoPlayAuthResponse(); + + //想request里面设置视频id + request.setVideoId("2d9426092b4b4a828343346f9492fa35"); + + //调用初始化方法得到凭证 + response = client.getAcsResponse(request); + + System.out.println("playauth:"+response.getPlayAuth()); + } + + public static void getPlayUrl() throws Exception{ + //TODO 1.根据视频ID获取视频播放地址 + + //创建初始化对象 + //这里的两个参数分别是id和秘钥,就是之前的oss中的id和秘钥 + DefaultAcsClient client = InitObject.initVodClient("LTAI5t7N46mP1ywxuZoV8i4q", "vQuZZOflAcgbTNls0oZJRTOqW6Pobe"); + + + //创建获取视频地址的request和response + GetPlayInfoRequest request = new GetPlayInfoRequest(); +// response = new GetPlayInfoResponse(); + + //向request对象里面设置视频id,在点播台可以看到 + //这里只能使用非加密的 + request.setVideoId("c20d6514ceeb420880cdec105e620527"); + + //调用初始化对象里面的方法,传递request,获取数据 + GetPlayInfoResponse response = client.getAcsResponse(request); //这是response里面就有视频的所有信息 + + //从response中获取需要的信息 + List playInfoList = response.getPlayInfoList(); + //播放地址 + for (GetPlayInfoResponse.PlayInfo playInfo : playInfoList) { + System.out.print("PlayInfo.PlayURL = " + playInfo.getPlayURL() + "\n"); + } + //Base信息 + System.out.print("VideoBase.Title = " + response.getVideoBase().getTitle() + "\n"); + } +} diff --git a/guli_parent_front/vue-admin-template-master/.babelrc b/guli_parent_front/vue-admin-template-master/.babelrc new file mode 100644 index 0000000..a2a380f --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": [ + ["env", { + "modules": false, + "targets": { + "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] + } + }], + "stage-2" + ], + "plugins":["transform-vue-jsx", "transform-runtime"] +} diff --git a/guli_parent_front/vue-admin-template-master/.editorconfig b/guli_parent_front/vue-admin-template-master/.editorconfig new file mode 100644 index 0000000..ea6e20f --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/guli_parent_front/vue-admin-template-master/.eslintignore b/guli_parent_front/vue-admin-template-master/.eslintignore new file mode 100644 index 0000000..e3a4037 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.eslintignore @@ -0,0 +1,3 @@ +build/*.js +config/*.js +src/assets diff --git a/guli_parent_front/vue-admin-template-master/.eslintrc.js b/guli_parent_front/vue-admin-template-master/.eslintrc.js new file mode 100644 index 0000000..0e5c28a --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.eslintrc.js @@ -0,0 +1,196 @@ +module.exports = { + root: true, + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + env: { + browser: true, + node: true, + es6: true, + }, + extends: ['plugin:vue/recommended', 'eslint:recommended'], + + // add your custom rules here + //it is base on https://github.com/vuejs/eslint-config-vue + rules: { + "vue/max-attributes-per-line": [2, { + "singleline": 10, + "multiline": { + "max": 1, + "allowFirstLine": false + } + }], + "vue/name-property-casing": ["error", "PascalCase"], + 'accessor-pairs': 2, + 'arrow-spacing': [2, { + 'before': true, + 'after': true + }], + 'block-spacing': [2, 'always'], + 'brace-style': [2, '1tbs', { + 'allowSingleLine': true + }], + 'camelcase': [0, { + 'properties': 'always' + }], + 'comma-dangle': [2, 'never'], + 'comma-spacing': [2, { + 'before': false, + 'after': true + }], + 'comma-style': [2, 'last'], + 'constructor-super': 2, + 'curly': [2, 'multi-line'], + 'dot-location': [2, 'property'], + 'eol-last': 2, + 'eqeqeq': [2, 'allow-null'], + 'generator-star-spacing': [2, { + 'before': true, + 'after': true + }], + 'handle-callback-err': [2, '^(err|error)$'], + 'indent': [2, 2, { + 'SwitchCase': 1 + }], + 'jsx-quotes': [2, 'prefer-single'], + 'key-spacing': [2, { + 'beforeColon': false, + 'afterColon': true + }], + 'keyword-spacing': [2, { + 'before': true, + 'after': true + }], + 'new-cap': [2, { + 'newIsCap': true, + 'capIsNew': false + }], + 'new-parens': 2, + 'no-array-constructor': 2, + 'no-caller': 2, + 'no-console': 'off', + 'no-class-assign': 2, + 'no-cond-assign': 2, + 'no-const-assign': 2, + 'no-control-regex': 2, + 'no-delete-var': 2, + 'no-dupe-args': 2, + 'no-dupe-class-members': 2, + 'no-dupe-keys': 2, + 'no-duplicate-case': 2, + 'no-empty-character-class': 2, + 'no-empty-pattern': 2, + 'no-eval': 2, + 'no-ex-assign': 2, + 'no-extend-native': 2, + 'no-extra-bind': 2, + 'no-extra-boolean-cast': 2, + 'no-extra-parens': [2, 'functions'], + 'no-fallthrough': 2, + 'no-floating-decimal': 2, + 'no-func-assign': 2, + 'no-implied-eval': 2, + 'no-inner-declarations': [2, 'functions'], + 'no-invalid-regexp': 2, + 'no-irregular-whitespace': 2, + 'no-iterator': 2, + 'no-label-var': 2, + 'no-labels': [2, { + 'allowLoop': false, + 'allowSwitch': false + }], + 'no-lone-blocks': 2, + 'no-mixed-spaces-and-tabs': 2, + 'no-multi-spaces': 2, + 'no-multi-str': 2, + 'no-multiple-empty-lines': [2, { + 'max': 1 + }], + 'no-native-reassign': 2, + 'no-negated-in-lhs': 2, + 'no-new-object': 2, + 'no-new-require': 2, + 'no-new-symbol': 2, + 'no-new-wrappers': 2, + 'no-obj-calls': 2, + 'no-octal': 2, + 'no-octal-escape': 2, + 'no-path-concat': 2, + 'no-proto': 2, + 'no-redeclare': 2, + 'no-regex-spaces': 2, + 'no-return-assign': [2, 'except-parens'], + 'no-self-assign': 2, + 'no-self-compare': 2, + 'no-sequences': 2, + 'no-shadow-restricted-names': 2, + 'no-spaced-func': 2, + 'no-sparse-arrays': 2, + 'no-this-before-super': 2, + 'no-throw-literal': 2, + 'no-trailing-spaces': 2, + 'no-undef': 2, + 'no-undef-init': 2, + 'no-unexpected-multiline': 2, + 'no-unmodified-loop-condition': 2, + 'no-unneeded-ternary': [2, { + 'defaultAssignment': false + }], + 'no-unreachable': 2, + 'no-unsafe-finally': 2, + 'no-unused-vars': [2, { + 'vars': 'all', + 'args': 'none' + }], + 'no-useless-call': 2, + 'no-useless-computed-key': 2, + 'no-useless-constructor': 2, + 'no-useless-escape': 0, + 'no-whitespace-before-property': 2, + 'no-with': 2, + 'one-var': [2, { + 'initialized': 'never' + }], + 'operator-linebreak': [2, 'after', { + 'overrides': { + '?': 'before', + ':': 'before' + } + }], + 'padded-blocks': [2, 'never'], + 'quotes': [2, 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }], + 'semi': [2, 'never'], + 'semi-spacing': [2, { + 'before': false, + 'after': true + }], + 'space-before-blocks': [2, 'always'], + 'space-before-function-paren': [2, 'never'], + 'space-in-parens': [2, 'never'], + 'space-infix-ops': 2, + 'space-unary-ops': [2, { + 'words': true, + 'nonwords': false + }], + 'spaced-comment': [2, 'always', { + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] + }], + 'template-curly-spacing': [2, 'never'], + 'use-isnan': 2, + 'valid-typeof': 2, + 'wrap-iife': [2, 'any'], + 'yield-star-spacing': [2, 'both'], + 'yoda': [2, 'never'], + 'prefer-const': 2, + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'object-curly-spacing': [2, 'always', { + objectsInObjects: false + }], + 'array-bracket-spacing': [2, 'never'] + } +} + diff --git a/guli_parent_front/vue-admin-template-master/.gitignore b/guli_parent_front/vue-admin-template-master/.gitignore new file mode 100644 index 0000000..78a0ead --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.gitignore @@ -0,0 +1,15 @@ +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +package-lock.json + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln diff --git a/guli_parent_front/vue-admin-template-master/.postcssrc.js b/guli_parent_front/vue-admin-template-master/.postcssrc.js new file mode 100644 index 0000000..eee3e92 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.postcssrc.js @@ -0,0 +1,10 @@ +// https://github.com/michael-ciniawsky/postcss-load-config + +module.exports = { + "plugins": { + "postcss-import": {}, + "postcss-url": {}, + // to edit target browsers: use "browserslist" field in package.json + "autoprefixer": {} + } +} diff --git a/guli_parent_front/vue-admin-template-master/.travis.yml b/guli_parent_front/vue-admin-template-master/.travis.yml new file mode 100644 index 0000000..16574d9 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: stable +script: npm run test +notifications: + email: false diff --git a/guli_parent_front/vue-admin-template-master/LICENSE b/guli_parent_front/vue-admin-template-master/LICENSE new file mode 100644 index 0000000..6151575 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present PanJiaChen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/guli_parent_front/vue-admin-template-master/README-zh.md b/guli_parent_front/vue-admin-template-master/README-zh.md new file mode 100644 index 0000000..c1b5aa8 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/README-zh.md @@ -0,0 +1,96 @@ +# vue-admin-template + +> 这是一个 极简的 vue admin 管理后台 它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。 + +[线上地址](http://panjiachen.github.io/vue-admin-template) + +[国内访问](https://panjiachen.gitee.io/vue-admin-template) + +## Extra + +如果你想要根据用户角色来动态生成侧边栏和 router,你可以使用改分支[permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control) + +本项目基于`webpack4`开发,若还想使用`webpack3`开发,请使用该分支[webpack3](https://github.com/PanJiaChen/vue-admin-template/tree/webpack3) + +如果你想使用基于 vue + typescript 的管理后台, 可以看看这个项目: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour)) + +## 相关项目 + +[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) + +[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) + +[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) + +写了一个系列的教程配套文章,如何从零构建后一个完整的后台项目: + +- [手摸手,带你用 vue 撸后台 系列一(基础篇)](https://juejin.im/post/59097cd7a22b9d0065fb61d2) +- [手摸手,带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac) +- [手摸手,带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35) +- [手摸手,带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板,专门针对本项目的文章,算作是一篇文档)](https://juejin.im/post/595b4d776fb9a06bbe7dba56) +- [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836) + +## Build Setup + +```bash +# Clone project +git clone https://github.com/PanJiaChen/vue-admin-template.git + +# Install dependencies +npm install + +# 建议不要用cnpm 安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题 +npm install --registry=https://registry.npm.taobao.org + +# Serve with hot reload at localhost:9528 +npm run dev + +# Build for production with minification +npm run build + +# Build for production and view the bundle analyzer report +npm run build --report +``` + +## Demo + +![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif) + +### Element-Ui 使用 cdn 教程 + +首先找到 `index.html` ([根目录下](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/index.html)) + +引入 Element 的 css 和 js ,并且引入 vue 。因为 Element-Ui 是依赖 vue 的,所以必须在它之前引入 vue 。 + +之后找到 [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/build/webpack.base.conf.js) 加入 `externals` 让 webpack 不打包 vue 和 element + +``` +externals: { + vue: 'Vue', + 'element-ui':'ELEMENT' +} +``` + +之后还有一个小细节是如果你用了全局对象方式引入 vue,就不需要 手动 `Vue.use(Vuex)` ,它会自动挂载,具体见 [issue](https://github.com/vuejs/vuex/issues/731) + +最终你可以使用 `npm run build --report` 查看效果 +如图: +![demo](https://panjiachen.github.io/images/element-cdn.png) + +**[具体代码](https://github.com/PanJiaChen/vue-admin-template/commit/746aff560932704ae821f82f10b8b2a9681d5177)** + +**[对应分支](https://github.com/PanJiaChen/vue-admin-template/tree/element-ui-cdn)** + +## Browsers support + +Modern browsers and Internet Explorer 10+. + +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | +| --------- | --------- | --------- | --------- | +| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions + +## License + +[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license. + +Copyright (c) 2017-present PanJiaChen diff --git a/guli_parent_front/vue-admin-template-master/README.md b/guli_parent_front/vue-admin-template-master/README.md new file mode 100644 index 0000000..e65db28 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/README.md @@ -0,0 +1,88 @@ +# vue-admin-template + +> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint + +**Live demo:** http://panjiachen.github.io/vue-admin-template + +[中文文档](https://github.com/PanJiaChen/vue-admin-template/blob/master/README-zh.md) + +## Build Setup + +```bash +# Clone project +git clone https://github.com/PanJiaChen/vue-admin-template.git + +# Install dependencies +npm install + +# Serve with hot reload at localhost:9528 +npm run dev + +# Build for production with minification +npm run build + +# Build for production and view the bundle analyzer report +npm run build --report +``` + +## Demo + +![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif) + +## Extra + +If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control) + +This project is based on `webpack4` development. If you want to use `webpack3` development, please use this branch [webpack3](https://github.com/PanJiaChen/vue-admin-template/tree/webpack3) + +For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour)) + +## Related Project + +[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) + +[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) + +[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) + +### Element-Ui using cdn tutorial + +First find `index.html`([root directory](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/index.html)) + +Import css and js of `Element`, and then import vue. Because `Element` is vue-dependent, vue must be import before it. + +Then find [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/build/webpack.base.conf.js) +Add `externals` to make webpack not package vue and element. + +``` +externals: { + vue: 'Vue', + 'element-ui':'ELEMENT' +} +``` + +Finally there is a small detail to pay attention to that if you import vue in global, you don't need to manually `Vue.use(Vuex)`, it will be automatically mounted, see +[issue](https://github.com/vuejs/vuex/issues/731) + +And you can use `npm run build --report` to see the effect + +Pictured: +![demo](https://panjiachen.github.io/images/element-cdn.png) + +**[Detailed code](https://github.com/PanJiaChen/vue-admin-template/commit/746aff560932704ae821f82f10b8b2a9681d5177)** + +**[Branch](https://github.com/PanJiaChen/vue-admin-template/tree/element-ui-cdn)** + +## Browsers support + +Modern browsers and Internet Explorer 10+. + +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | +| --------- | --------- | --------- | --------- | +| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions + +## License + +[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license. + +Copyright (c) 2017-present PanJiaChen diff --git a/guli_parent_front/vue-admin-template-master/config/dev.env.js b/guli_parent_front/vue-admin-template-master/config/dev.env.js new file mode 100644 index 0000000..5a256ad --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/config/dev.env.js @@ -0,0 +1,11 @@ +'use strict' +const merge = require('webpack-merge') +const prodEnv = require('./prod.env') + +//开发环境的入口,这里的API就是入口,以后改为自己的入口 +module.exports = merge(prodEnv, { + NODE_ENV: '"development"', + // BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"', + //这里改为nginx的端口号9001,让nginx去代理 + BASE_API: '"http://localhost:9001"', +}) diff --git a/guli_parent_front/vue-admin-template-master/config/index.js b/guli_parent_front/vue-admin-template-master/config/index.js new file mode 100644 index 0000000..c1f181b --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/config/index.js @@ -0,0 +1,86 @@ +'use strict' +// Template version: 1.2.6 +// see http://vuejs-templates.github.io/webpack for documentation. + +const path = require('path') + +module.exports = { + dev: { + // Paths + assetsSubDirectory: 'static', + assetsPublicPath: '/', + proxyTable: {}, + + // Various Dev Server settings + host: 'localhost', // can be overwritten by process.env.HOST + port: 9527, //默认9528这里致敬星爷 can be overwritten by process.env.PORT, if port is in use, a free one will be determined + autoOpenBrowser: true, + errorOverlay: true, + notifyOnErrors: false, + poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- + + // Use Eslint Loader? + // If true, your code will be linted during bundling and + // linting errors and warnings will be shown in the console. + useEslint: false, //默认是ture改为false,他可以检查代码,但是代码检查太严格,改为false + // If true, eslint errors and warnings will also be shown in the error overlay + // in the browser. + showEslintErrorsInOverlay: false, + + /** + * Source Maps + */ + + // https://webpack.js.org/configuration/devtool/#development + devtool: 'cheap-source-map', + + // CSS Sourcemaps off by default because relative paths are "buggy" + // with this option, according to the CSS-Loader README + // (https://github.com/webpack/css-loader#sourcemaps) + // In our experience, they generally work as expected, + // just be aware of this issue when enabling this option. + cssSourceMap: false + }, + + build: { + // Template for index.html + index: path.resolve(__dirname, '../dist/index.html'), + + // Paths + assetsRoot: path.resolve(__dirname, '../dist'), + assetsSubDirectory: 'static', + + /** + * You can set by youself according to actual condition + * You will need to set this if you plan to deploy your site under a sub path, + * for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/, + * then assetsPublicPath should be set to "/bar/". + * In most cases please use '/' !!! + */ + assetsPublicPath: '/', + + /** + * Source Maps + */ + + productionSourceMap: false, + // https://webpack.js.org/configuration/devtool/#production + devtool: 'source-map', + + // Gzip off by default as many popular static hosts such as + // Surge or Netlify already gzip all static assets for you. + // Before setting to `true`, make sure to: + // npm install --save-dev compression-webpack-plugin + productionGzip: false, + productionGzipExtensions: ['js', 'css'], + + // Run the build command with an extra argument to + // View the bundle analyzer report after build finishes: + // `npm run build --report` + // Set to `true` or `false` to always turn it on or off + bundleAnalyzerReport: process.env.npm_config_report || false, + + // `npm run build:prod --generate_report` + generateAnalyzerReport: process.env.npm_config_generate_report || false + } +} diff --git a/guli_parent_front/vue-admin-template-master/config/prod.env.js b/guli_parent_front/vue-admin-template-master/config/prod.env.js new file mode 100644 index 0000000..4d5850d --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/config/prod.env.js @@ -0,0 +1,7 @@ +'use strict' + +//生产环境的入口,这里暂时不是用 +module.exports = { + NODE_ENV: '"production"', + BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"', +} diff --git a/guli_parent_front/vue-admin-template-master/favicon.ico b/guli_parent_front/vue-admin-template-master/favicon.ico new file mode 100644 index 0000000..34b63ac Binary files /dev/null and b/guli_parent_front/vue-admin-template-master/favicon.ico differ diff --git a/guli_parent_front/vue-admin-template-master/index.html b/guli_parent_front/vue-admin-template-master/index.html new file mode 100644 index 0000000..1e56e37 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/index.html @@ -0,0 +1,15 @@ + + + + + + vue-admin-template + + + + + +
+ + + diff --git a/guli_parent_front/vue-admin-template-master/package.json b/guli_parent_front/vue-admin-template-master/package.json new file mode 100644 index 0000000..c5f7e41 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/package.json @@ -0,0 +1,86 @@ +{ + "name": "vue-admin-template", + "version": "3.8.0", + "license": "MIT", + "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", + "author": "Pan ", + "scripts": { + "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", + "start": "npm run dev", + "build": "node build/build.js", + "build:report": "npm_config_report=true npm run build", + "lint": "eslint --ext .js,.vue src", + "test": "npm run lint", + "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" + }, + "dependencies": { + "axios": "0.18.0", + "element-ui": "2.4.6", + "js-cookie": "2.2.0", + "node-sass": "^7.0.1", + "normalize.css": "7.0.0", + "nprogress": "0.2.0", + "vue": "2.5.17", + "vue-router": "3.0.1", + "vuex": "3.0.1" + }, + "devDependencies": { + "autoprefixer": "8.5.0", + "babel-core": "6.26.0", + "babel-eslint": "8.2.6", + "babel-helper-vue-jsx-merge-props": "2.0.3", + "babel-loader": "7.1.5", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-plugin-transform-runtime": "6.23.0", + "babel-plugin-transform-vue-jsx": "3.7.0", + "babel-preset-env": "1.7.0", + "babel-preset-stage-2": "6.24.1", + "chalk": "2.4.1", + "copy-webpack-plugin": "4.5.2", + "css-loader": "1.0.0", + "eslint": "4.19.1", + "eslint-friendly-formatter": "4.0.1", + "eslint-loader": "2.0.0", + "eslint-plugin-vue": "4.7.1", + "eventsource-polyfill": "0.9.6", + "file-loader": "1.1.11", + "friendly-errors-webpack-plugin": "1.7.0", + "html-webpack-plugin": "4.0.0-alpha", + "mini-css-extract-plugin": "0.4.1", + "node-notifier": "5.2.1", + "node-sass": "^7.0.1", + "optimize-css-assets-webpack-plugin": "5.0.0", + "ora": "3.0.0", + "path-to-regexp": "2.4.0", + "portfinder": "1.0.16", + "postcss-import": "12.0.0", + "postcss-loader": "2.1.6", + "postcss-url": "7.3.2", + "rimraf": "2.6.2", + "sass-loader": "7.0.3", + "script-ext-html-webpack-plugin": "2.0.1", + "semver": "5.5.0", + "shelljs": "0.8.2", + "svg-sprite-loader": "3.8.0", + "svgo": "1.0.5", + "uglifyjs-webpack-plugin": "1.2.7", + "url-loader": "1.0.1", + "vue-loader": "15.3.0", + "vue-style-loader": "4.1.2", + "vue-template-compiler": "2.5.17", + "webpack": "4.16.5", + "webpack-bundle-analyzer": "2.13.1", + "webpack-cli": "3.1.0", + "webpack-dev-server": "3.1.5", + "webpack-merge": "4.1.4" + }, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 8" + ] +} diff --git a/guli_parent_front/vue-admin-template-master/src/App.vue b/guli_parent_front/vue-admin-template-master/src/App.vue new file mode 100644 index 0000000..721d3a3 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/App.vue @@ -0,0 +1,11 @@ + + + diff --git a/guli_parent_front/vue-admin-template-master/src/api/edu-chapter/chapter.js b/guli_parent_front/vue-admin-template-master/src/api/edu-chapter/chapter.js new file mode 100644 index 0000000..ab749c8 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/edu-chapter/chapter.js @@ -0,0 +1,54 @@ +// teacher的相关API的封装和请求 +// 引入utils里面的request基础文件,里面封装好了axios等方法 +import request from '@/utils/request' + + +export default { + // 1.根据课程id获取章节和小结数据列表功能 + getChapterVideo(courseId) { + return request( + { + url: `/eduservice/edu-chapter/getChapterVideo/${courseId}`, + method: 'get', + } + ) + }, + //添加章节 + addChapter(chapter){ + return request( + { + url: `/eduservice/edu-chapter/addCourse`, + method: 'post', + data: chapter + } + ) + }, + getChapter(chapterId){ + return request( + { + url: `/eduservice/edu-chapter/getChapter/${chapterId}`, + method: 'get', + } + ) + }, + updateChapter(chapter){ + return request( + { + url: `/eduservice/edu-chapter/updateChapter`, + method: 'post', + data: chapter + } + ) + }, + deleteChapter(chapterId){ + return request( + { + url: `/eduservice/edu-chapter/${chapterId}`, + method: 'delete', + } + ) + } + + + +} diff --git a/guli_parent_front/vue-admin-template-master/src/api/edu-course/course.js b/guli_parent_front/vue-admin-template-master/src/api/edu-course/course.js new file mode 100644 index 0000000..324dda6 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/edu-course/course.js @@ -0,0 +1,51 @@ +// teacher的相关API的封装和请求 +// 引入utils里面的request基础文件,里面封装好了axios等方法 +import request from '@/utils/request' + +export default { + // 1.添加课程信息功能 + addCourseInfo(courseInfo) { + return request( + { + url: `/eduservice/edu-course/addCourseInfo`, + method: 'post', + data: courseInfo + } + ) + }, + //2.查询所有的讲师,用于下拉列表 + getListTeacher(){ + return request( + { + url: `/eduservice/edu-teacher/findAll`, + method: 'get', + } + ) + + }, + //根据课程id查询课程基本信息 + getCourseInfo(id){ + return request( + { + url: `/eduservice/edu-course/getCourseInfo/${id}`, + method: 'get', + } + ) + }, + + + //修改课程信息 + updateCourseInfo(courseInfo){ + return request( + { + url: `/eduservice/edu-course/updateCourseInfo`, + method: 'post', + data: courseInfo + } + ) + + } + + + +} diff --git a/guli_parent_front/vue-admin-template-master/src/api/edu-subject/subject.js b/guli_parent_front/vue-admin-template-master/src/api/edu-subject/subject.js new file mode 100644 index 0000000..d93583a --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/edu-subject/subject.js @@ -0,0 +1,15 @@ +// teacher的相关API的封装和请求 +// 引入utils里面的request基础文件,里面封装好了axios等方法 +import request from '@/utils/request' + +export default { + // 1.课程分类 + getSubjectList() { + return request( + { + url: `/eduservice/edu-subject/getAllSubject`, + method: 'get' + } + ) + } +} diff --git a/guli_parent_front/vue-admin-template-master/src/api/edu-teacher/teacher.js b/guli_parent_front/vue-admin-template-master/src/api/edu-teacher/teacher.js new file mode 100644 index 0000000..3d18d50 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/edu-teacher/teacher.js @@ -0,0 +1,67 @@ +//teacher的相关API的封装和请求 +// 引入utils里面的request基础文件,里面封装好了axios等方法 +import request from '@/utils/request' + +export default{ + + //1.讲师列表(条件查询分页) + //current当前页 limit每页记录数 teacherQuery条件对象 + getTeacherListPage(current,limit,teacherQuery){ + return request({ + // url: '/table/list/'+current+'/'+limit, + url: `/eduservice/edu-teacher/pageTeacherCondition/${current}/${limit}`, + method: 'post', + //teacherQuery条件对象,后端使用RequestBody获取数据 + data: teacherQuery + }) + + }, + + //2 删除讲师的方法 + deleteTeacherId(id){ + return request({ + // url: '/table/list/'+current+'/'+limit, + url: `/eduservice/edu-teacher/${id}`, + method: 'delete', + }) + + }, + + //3 添加讲师的方法 + addTeacher(teacher){ + return request({ + // url: '/table/list/'+current+'/'+limit, + url: `/eduservice/edu-teacher/addTeacher`, + method: 'post', + data: teacher + }) + }, + + //4 根据id查询数据 + getTeacherInfo(id){ + return request({ + // url: '/table/list/'+current+'/'+limit, + url: `/eduservice/edu-teacher/getTeacher/${id}`, + method: 'get' + }) + }, + + + //5 修改讲师 + updateTeacherInfo(teacher){ + return request({ + // url: '/table/list/'+current+'/'+limit, + url: `/eduservice/edu-teacher/updateTeacher`, + method: 'post', + data: teacher + }) + } + + + + + + + + +} diff --git a/guli_parent_front/vue-admin-template-master/src/api/edu-video/video.js b/guli_parent_front/vue-admin-template-master/src/api/edu-video/video.js new file mode 100644 index 0000000..3b410a6 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/edu-video/video.js @@ -0,0 +1,54 @@ +// teacher的相关API的封装和请求 +// 引入utils里面的request基础文件,里面封装好了axios等方法 +import request from '@/utils/request' + + +export default { + // // 1.根据课程id获取章节和小结数据列表功能 + // getChapterVideo(courseId) { + // return request( + // { + // url: `/eduservice/edu-chapter/getChapterVideo/${courseId}`, + // method: 'get', + // } + // ) + // }, + //添加章节 + addVideo(video){ + return request( + { + url: `/eduservice/edu-video/addVideo`, + method: 'post', + data: video + } + ) + }, + getVideo(videoId){ + return request( + { + url: `/eduservice/edu-video/getVideo/${videoId}`, + method: 'get', + } + ) + }, + updateVideo(video){ + return request( + { + url: `/eduservice/edu-video/updateVideo`, + method: 'post', + data: video + } + ) + }, + deleteVideo(chapterId){ + return request( + { + url: `/eduservice/edu-video/${chapterId}`, + method: 'delete', + } + ) + } + + + +} diff --git a/guli_parent_front/vue-admin-template-master/src/api/login.js b/guli_parent_front/vue-admin-template-master/src/api/login.js new file mode 100644 index 0000000..e91310c --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/login.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function login(username, password) { + return request({ + url: '/eduservice/user/login', + method: 'post', + data: { + username, + password + } + }) +} + +export function getInfo(token) { + return request({ + url: '/eduservice/user/info', + method: 'get', + params: { token } + }) +} + +export function logout() { + return request({ + url: '/eduservice/user/logout', + method: 'post' + }) +} diff --git a/guli_parent_front/vue-admin-template-master/src/api/table.js b/guli_parent_front/vue-admin-template-master/src/api/table.js new file mode 100644 index 0000000..e29c294 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/api/table.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function getList(params) { + return request({ + url: '/table/list', + method: 'get', + params + }) +} diff --git a/guli_parent_front/vue-admin-template-master/src/assets/404_images/404.png b/guli_parent_front/vue-admin-template-master/src/assets/404_images/404.png new file mode 100644 index 0000000..3d8e230 Binary files /dev/null and b/guli_parent_front/vue-admin-template-master/src/assets/404_images/404.png differ diff --git a/guli_parent_front/vue-admin-template-master/src/assets/404_images/404_cloud.png b/guli_parent_front/vue-admin-template-master/src/assets/404_images/404_cloud.png new file mode 100644 index 0000000..c6281d0 Binary files /dev/null and b/guli_parent_front/vue-admin-template-master/src/assets/404_images/404_cloud.png differ diff --git a/guli_parent_front/vue-admin-template-master/src/components/Breadcrumb/index.vue b/guli_parent_front/vue-admin-template-master/src/components/Breadcrumb/index.vue new file mode 100644 index 0000000..7e0f311 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/Breadcrumb/index.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/guli_parent_front/vue-admin-template-master/src/components/Hamburger/index.vue b/guli_parent_front/vue-admin-template-master/src/components/Hamburger/index.vue new file mode 100644 index 0000000..f1f9bda --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/Hamburger/index.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/index.vue b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/index.vue new file mode 100644 index 0000000..04b1ede --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/index.vue @@ -0,0 +1,1420 @@ + + + + + + + diff --git a/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/data2blob.js b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/data2blob.js new file mode 100644 index 0000000..9c47f8a --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/data2blob.js @@ -0,0 +1,19 @@ +/** + * database64文件格式转换为2进制 + * + * @param {[String]} data dataURL 的格式为 “data:image/png;base64,****”,逗号之前都是一些说明性的文字,我们只需要逗号之后的就行了 + * @param {[String]} mime [description] + * @return {[blob]} [description] + */ +export default function(data, mime) { + data = data.split(',')[1] + data = window.atob(data) + var ia = new Uint8Array(data.length) + for (var i = 0; i < data.length; i++) { + ia[i] = data.charCodeAt(i) + } + // canvas.toDataURL 返回的默认格式就是 image/png + return new Blob([ia], { + type: mime + }) +} diff --git a/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/effectRipple.js b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/effectRipple.js new file mode 100644 index 0000000..46a0164 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/effectRipple.js @@ -0,0 +1,39 @@ +/** + * 点击波纹效果 + * + * @param {[event]} e [description] + * @param {[Object]} arg_opts [description] + * @return {[bollean]} [description] + */ +export default function(e, arg_opts) { + var opts = Object.assign({ + ele: e.target, // 波纹作用元素 + type: 'hit', // hit点击位置扩散center中心点扩展 + bgc: 'rgba(0, 0, 0, 0.15)' // 波纹颜色 + }, arg_opts) + var target = opts.ele + if (target) { + var rect = target.getBoundingClientRect() + var ripple = target.querySelector('.e-ripple') + if (!ripple) { + ripple = document.createElement('span') + ripple.className = 'e-ripple' + ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px' + target.appendChild(ripple) + } else { + ripple.className = 'e-ripple' + } + switch (opts.type) { + case 'center': + ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px' + ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px' + break + default: + ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px' + ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px' + } + ripple.style.backgroundColor = opts.bgc + ripple.className = 'e-ripple z-active' + return false + } +} diff --git a/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/language.js b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/language.js new file mode 100644 index 0000000..727872d --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/language.js @@ -0,0 +1,232 @@ +export default { + zh: { + hint: '点击,或拖动图片至此处', + loading: '正在上传……', + noSupported: '浏览器不支持该功能,请使用IE10以上或其他现在浏览器!', + success: '上传成功', + fail: '图片上传失败', + preview: '头像预览', + btn: { + off: '取消', + close: '关闭', + back: '上一步', + save: '保存' + }, + error: { + onlyImg: '仅限图片格式', + outOfSize: '单文件大小不能超过 ', + lowestPx: '图片最低像素为(宽*高):' + } + }, + 'zh-tw': { + hint: '點擊,或拖動圖片至此處', + loading: '正在上傳……', + noSupported: '瀏覽器不支持該功能,請使用IE10以上或其他現代瀏覽器!', + success: '上傳成功', + fail: '圖片上傳失敗', + preview: '頭像預覽', + btn: { + off: '取消', + close: '關閉', + back: '上一步', + save: '保存' + }, + error: { + onlyImg: '僅限圖片格式', + outOfSize: '單文件大小不能超過 ', + lowestPx: '圖片最低像素為(寬*高):' + } + }, + en: { + hint: 'Click or drag the file here to upload', + loading: 'Uploading…', + noSupported: 'Browser is not supported, please use IE10+ or other browsers', + success: 'Upload success', + fail: 'Upload failed', + preview: 'Preview', + btn: { + off: 'Cancel', + close: 'Close', + back: 'Back', + save: 'Save' + }, + error: { + onlyImg: 'Image only', + outOfSize: 'Image exceeds size limit: ', + lowestPx: 'Image\'s size is too low. Expected at least: ' + } + }, + ro: { + hint: 'Atinge sau trage fișierul aici', + loading: 'Se încarcă', + noSupported: 'Browser-ul tău nu suportă acest feature. Te rugăm încearcă cu alt browser.', + success: 'S-a încărcat cu succes', + fail: 'A apărut o problemă la încărcare', + preview: 'Previzualizează', + + btn: { + off: 'Anulează', + close: 'Închide', + back: 'Înapoi', + save: 'Salvează' + }, + + error: { + onlyImg: 'Doar imagini', + outOfSize: 'Imaginea depășește limita de: ', + loewstPx: 'Imaginea este prea mică; Minim: ' + } + }, + ru: { + hint: 'Нажмите, или перетащите файл в это окно', + loading: 'Загружаю……', + noSupported: 'Ваш браузер не поддерживается, пожалуйста, используйте IE10 + или другие браузеры', + success: 'Загрузка выполнена успешно', + fail: 'Ошибка загрузки', + preview: 'Предпросмотр', + btn: { + off: 'Отменить', + close: 'Закрыть', + back: 'Назад', + save: 'Сохранить' + }, + error: { + onlyImg: 'Только изображения', + outOfSize: 'Изображение превышает предельный размер: ', + lowestPx: 'Минимальный размер изображения: ' + } + }, + 'pt-br': { + hint: 'Clique ou arraste o arquivo aqui para carregar', + loading: 'Carregando…', + noSupported: 'Browser não suportado, use o IE10+ ou outro browser', + success: 'Sucesso ao carregar imagem', + fail: 'Falha ao carregar imagem', + preview: 'Pré-visualizar', + btn: { + off: 'Cancelar', + close: 'Fechar', + back: 'Voltar', + save: 'Salvar' + }, + error: { + onlyImg: 'Apenas imagens', + outOfSize: 'A imagem excede o limite de tamanho: ', + lowestPx: 'O tamanho da imagem é muito pequeno. Tamanho mínimo: ' + } + }, + fr: { + hint: 'Cliquez ou glissez le fichier ici.', + loading: 'Téléchargement…', + noSupported: 'Votre navigateur n\'est pas supporté. Utilisez IE10 + ou un autre navigateur s\'il vous plaît.', + success: 'Téléchargement réussit', + fail: 'Téléchargement echoué', + preview: 'Aperçu', + btn: { + off: 'Annuler', + close: 'Fermer', + back: 'Retour', + save: 'Enregistrer' + }, + error: { + onlyImg: 'Image uniquement', + outOfSize: 'L\'image sélectionnée dépasse la taille maximum: ', + lowestPx: 'L\'image sélectionnée est trop petite. Dimensions attendues: ' + } + }, + nl: { + hint: 'Klik hier of sleep een afbeelding in dit vlak', + loading: 'Uploaden…', + noSupported: 'Je browser wordt helaas niet ondersteund. Gebruik IE10+ of een andere browser.', + success: 'Upload succesvol', + fail: 'Upload mislukt', + preview: 'Voorbeeld', + btn: { + off: 'Annuleren', + close: 'Sluiten', + back: 'Terug', + save: 'Opslaan' + }, + error: { + onlyImg: 'Alleen afbeeldingen', + outOfSize: 'De afbeelding is groter dan: ', + lowestPx: 'De afbeelding is te klein! Minimale afmetingen: ' + } + }, + tr: { + hint: 'Tıkla veya yüklemek istediğini buraya sürükle', + loading: 'Yükleniyor…', + noSupported: 'Tarayıcı desteklenmiyor, lütfen IE10+ veya farklı tarayıcı kullanın', + success: 'Yükleme başarılı', + fail: 'Yüklemede hata oluştu', + preview: 'Önizle', + btn: { + off: 'İptal', + close: 'Kapat', + back: 'Geri', + save: 'Kaydet' + }, + error: { + onlyImg: 'Sadece resim', + outOfSize: 'Resim yükleme limitini aşıyor: ', + lowestPx: 'Resmin boyutu çok küçük. En az olması gereken: ' + } + }, + 'es-MX': { + hint: 'Selecciona o arrastra una imagen', + loading: 'Subiendo...', + noSupported: 'Tu navegador no es soportado, porfavor usa IE10+ u otros navegadores mas recientes', + success: 'Subido exitosamente', + fail: 'Sucedió un error', + preview: 'Vista previa', + btn: { + off: 'Cancelar', + close: 'Cerrar', + back: 'Atras', + save: 'Guardar' + }, + error: { + onlyImg: 'Unicamente imagenes', + outOfSize: 'La imagen excede el tamaño maximo:', + lowestPx: 'La imagen es demasiado pequeño. Se espera por lo menos:' + } + }, + de: { + hint: 'Klick hier oder zieh eine Datei hier rein zum Hochladen', + loading: 'Hochladen…', + noSupported: 'Browser wird nicht unterstützt, bitte verwende IE10+ oder andere Browser', + success: 'Upload erfolgreich', + fail: 'Upload fehlgeschlagen', + preview: 'Vorschau', + btn: { + off: 'Abbrechen', + close: 'Schließen', + back: 'Zurück', + save: 'Speichern' + }, + error: { + onlyImg: 'Nur Bilder', + outOfSize: 'Das Bild ist zu groß: ', + lowestPx: 'Das Bild ist zu klein. Mindestens: ' + } + }, + ja: { + hint: 'クリック・ドラッグしてファイルをアップロード', + loading: 'アップロード中...', + noSupported: 'このブラウザは対応されていません。IE10+かその他の主要ブラウザをお使いください。', + success: 'アップロード成功', + fail: 'アップロード失敗', + preview: 'プレビュー', + btn: { + off: 'キャンセル', + close: '閉じる', + back: '戻る', + save: '保存' + }, + error: { + onlyImg: '画像のみ', + outOfSize: '画像サイズが上限を超えています。上限: ', + lowestPx: '画像が小さすぎます。最小サイズ: ' + } + } +} diff --git a/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/mimes.js b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/mimes.js new file mode 100644 index 0000000..e20c085 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/ImageCropper/utils/mimes.js @@ -0,0 +1,7 @@ +export default { + 'jpg': 'image/jpeg', + 'png': 'image/png', + 'gif': 'image/gif', + 'svg': 'image/svg+xml', + 'psd': 'image/photoshop' +} diff --git a/guli_parent_front/vue-admin-template-master/src/components/PanThumb/index.vue b/guli_parent_front/vue-admin-template-master/src/components/PanThumb/index.vue new file mode 100644 index 0000000..ec549f4 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/PanThumb/index.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/guli_parent_front/vue-admin-template-master/src/components/SvgIcon/index.vue b/guli_parent_front/vue-admin-template-master/src/components/SvgIcon/index.vue new file mode 100644 index 0000000..12a1f58 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/SvgIcon/index.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/guli_parent_front/vue-admin-template-master/src/components/Tinymce/components/editorImage.vue b/guli_parent_front/vue-admin-template-master/src/components/Tinymce/components/editorImage.vue new file mode 100644 index 0000000..bcd8209 --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/Tinymce/components/editorImage.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/guli_parent_front/vue-admin-template-master/src/components/Tinymce/index.vue b/guli_parent_front/vue-admin-template-master/src/components/Tinymce/index.vue new file mode 100644 index 0000000..7f4a0ae --- /dev/null +++ b/guli_parent_front/vue-admin-template-master/src/components/Tinymce/index.vue @@ -0,0 +1,204 @@ +