From 46fe3328b72b136b9681c54232677630dbc837b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <1489339700@qq.com> Date: Tue, 16 Aug 2022 14:03:31 +0800 Subject: [PATCH 1/4] sb --- src/test/java/com/sixteam/irs/IrsApplicationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/sixteam/irs/IrsApplicationTests.java b/src/test/java/com/sixteam/irs/IrsApplicationTests.java index e8d849f..d4205c1 100644 --- a/src/test/java/com/sixteam/irs/IrsApplicationTests.java +++ b/src/test/java/com/sixteam/irs/IrsApplicationTests.java @@ -9,7 +9,7 @@ class IrsApplicationTests { @Test void contextLoads() { System.out.println("hcd"); - System.out.println("ttttest"); + System.out.println("st"); } } -- Gitee From 8eb81849e51cb616bbb2bd0772c8569134ca6d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <1489339700@qq.com> Date: Tue, 16 Aug 2022 19:31:32 +0800 Subject: [PATCH 2/4] sbsb --- pom.xml | 39 ++++++ .../irs => ltw/zhaopin1}/IrsApplication.java | 2 +- .../controller/EncyclopediaController.java | 110 +++++++++++++++++ .../com/ltw/zhaopin1/entity/Encyclopedia.java | 53 +++++++++ .../zhaopin1/mapper/EncyclopediaMapper.java | 25 ++++ .../zhaopin1/service/EncyclopediaService.java | 24 ++++ .../service/impl/EncyclopediaServiceImpl.java | 48 ++++++++ src/main/resources/application.yml | 37 +++++- .../zhaopin1}/IrsApplicationTests.java | 2 +- src/webapp/encyclopedia/add.jsp | 14 +++ src/webapp/encyclopedia/encyclopediaList.jsp | 112 ++++++++++++++++++ .../encyclopedia/updateEncyclopedia.jsp | 14 +++ src/webapp/index.jsp | 18 +++ src/webapp/message.jsp | 16 +++ 14 files changed, 511 insertions(+), 3 deletions(-) rename src/main/java/com/{sixteam/irs => ltw/zhaopin1}/IrsApplication.java (92%) create mode 100644 src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java create mode 100644 src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java create mode 100644 src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java create mode 100644 src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java create mode 100644 src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java rename src/test/java/com/{sixteam/irs => ltw/zhaopin1}/IrsApplicationTests.java (90%) create mode 100644 src/webapp/encyclopedia/add.jsp create mode 100644 src/webapp/encyclopedia/encyclopediaList.jsp create mode 100644 src/webapp/encyclopedia/updateEncyclopedia.jsp create mode 100644 src/webapp/index.jsp create mode 100644 src/webapp/message.jsp diff --git a/pom.xml b/pom.xml index c31f5b8..07fcfae 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,45 @@ 1.1.22 + + com.github.pagehelper + pagehelper + 5.1.2 + + + + com.alibaba + druid-spring-boot-starter + 1.1.22 + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + + + javax.servlet + javax.servlet-api + + + + javax.servlet.jsp.jstl + javax.servlet.jsp.jstl-api + 1.2.2 + + + taglibs + standard + 1.1.2 + + diff --git a/src/main/java/com/sixteam/irs/IrsApplication.java b/src/main/java/com/ltw/zhaopin1/IrsApplication.java similarity index 92% rename from src/main/java/com/sixteam/irs/IrsApplication.java rename to src/main/java/com/ltw/zhaopin1/IrsApplication.java index 1195710..a5fb25b 100644 --- a/src/main/java/com/sixteam/irs/IrsApplication.java +++ b/src/main/java/com/ltw/zhaopin1/IrsApplication.java @@ -1,4 +1,4 @@ -package com.sixteam.irs; +package com.ltw.zhaopin1; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java b/src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java new file mode 100644 index 0000000..635e613 --- /dev/null +++ b/src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java @@ -0,0 +1,110 @@ +package com.ltw.zhaopin1.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.ltw.zhaopin1.entity.Encyclopedia; +import com.ltw.zhaopin1.service.EncyclopediaService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Controller +@RequestMapping(value = "/ee") +public class EncyclopediaController { + @Autowired + private EncyclopediaService encyclopediaService; + + + @RequestMapping(value = "/list") + public String list(ModelMap map, @RequestParam(defaultValue="1",required=true,value="pageNo") Integer pageNo) { + + Integer pageSize=4;//每页显示记录数 + //分页查询 + PageHelper.startPage(pageNo, pageSize); + List encyclopediaList = encyclopediaService.findAllEncyclopedias();//获取所有用户信息 + PageInfo pageInfo=new PageInfo(encyclopediaList); + map.addAttribute("pageInfo", pageInfo); + + return "encyclopedia/encyclopediaList"; + } + + @RequestMapping(value = "/toAdd") + public String toAdd(Integer encId, HttpServletRequest request) { + System.out.println(encId); + + return "encyclopedia/add"; + } + @RequestMapping(value = "/add") + public ModelAndView add(Encyclopedia encyclopedia) { + + ModelAndView nav = new ModelAndView(); + + int res = encyclopediaService.addEncyclopedia(encyclopedia); + + if (res > 0) { + nav.addObject("msg", "添加公告成功"); + nav.setViewName("redirect:/ee/list"); + } else { + nav.addObject("msg", "添加公告失败"); + nav.setViewName("message"); + } + + return nav; + } + @RequestMapping(value = "/del") + public String del(Integer encId, HttpServletRequest request) { + + int res = encyclopediaService.delEncyclopedia(encId); + if (res > 0) { + + request.setAttribute("msg", "删除公告成功"); + return "redirect:/ee/list"; + } else { + request.setAttribute("msg", "删除公告失败"); + return "encyclopedia/message.jsp"; + } + } + @RequestMapping(value = "/toUpdate") + public String toUpdate(Integer encId, HttpServletRequest request) { + + Encyclopedia encyclopedia = encyclopediaService.findById(encId); + + request.setAttribute("encyclopedia", encyclopedia); + return "encyclopedia/updateEncyclopedia"; + } + @RequestMapping(value = "/update") + public String update(Encyclopedia encyclopedia, HttpServletRequest request) { + + int res = encyclopediaService.updateEncyclopedia(encyclopedia); + if (res > 0) { + + return "redirect:/ee/list"; + } else { + request.setAttribute("msg", "修改公告失败"); + return "encyclopedia/message.jsp"; + } + } + @RequestMapping(value = "/like") + public String like(ModelMap map, + @RequestParam(defaultValue="1",required=true,value="pageNo") Integer pageNo,String encTitle) { + + Integer pageSize=4;//每页显示记录数 + //分页查询 + PageHelper.startPage(pageNo, pageSize); + List encyclopediaList = encyclopediaService.findEncyclopediaByLike(encTitle);//获取所有用户信息 + PageInfo pageInfo=new PageInfo(encyclopediaList); + map.addAttribute("pageInfo", pageInfo); + + return "encyclopedia/encyclopediaList"; + } + + } + + + diff --git a/src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java b/src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java new file mode 100644 index 0000000..80a2501 --- /dev/null +++ b/src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java @@ -0,0 +1,53 @@ +package com.ltw.zhaopin1.entity; + + +public class Encyclopedia { + + private Integer encId; + private String encTitle; + private String encContext; + private String encTime; + + + @Override + public String toString() { + return "Encyclopedia{" + + "encId=" + encId + + ", encTitle='" + encTitle + '\'' + + ", encContext='" + encContext + '\'' + + ", encTime='" + encTime + '\'' + + '}'; + } + + public Integer getEncId() { + return encId; + } + + public void setEncId(Integer encId) { + this.encId = encId; + } + + public String getEncTitle() { + return encTitle; + } + + public void setEncTitle(String encTitle) { + this.encTitle = encTitle; + } + + public String getEncContext() { + return encContext; + } + + public void setEncContext(String encContext) { + this.encContext = encContext; + } + + public String getEncTime() { + return encTime; + } + + public void setEncTime(String encTime) { + this.encTime = encTime; + } +} diff --git a/src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java b/src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java new file mode 100644 index 0000000..4a9f675 --- /dev/null +++ b/src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java @@ -0,0 +1,25 @@ +package com.ltw.zhaopin1.mapper; + + +import com.ltw.zhaopin1.entity.Encyclopedia; +import org.apache.ibatis.annotations.*; + +import java.util.List; + + +@Mapper +public interface EncyclopediaMapper { + + @Insert("INSERT INTO t_enc VALUES (NULL, #{encTitle}, #{encContent}, NULL)") + int add(Encyclopedia encyclopedia); + @Delete("delete from t_enc where encId = #{encId}") + int del(Integer encId); + @Update("update t_enc set encTitle = #{encTitle}, encContext = #{encContext}, time =#{encTime} where encId = #{encId} ") + int update(Encyclopedia encyclopedia); + @Select("select * from t_enc where encId = #{encId}") + Encyclopedia getById(Integer encId); + @Select("select * from t_enc") + List getAllEncyclopedias(); + @Select("select * from t_enc where encTitle like '%' #{encTitle} '%' ") + List getEncyclopediaByLike(String encTitle); +} diff --git a/src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java b/src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java new file mode 100644 index 0000000..421a5b3 --- /dev/null +++ b/src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java @@ -0,0 +1,24 @@ +package com.ltw.zhaopin1.service; + + +import com.ltw.zhaopin1.entity.Encyclopedia; + +import java.util.List; + +public interface EncyclopediaService { + + int addEncyclopedia(Encyclopedia encyclopedia); + + int delEncyclopedia(Integer encId); + + int updateEncyclopedia(Encyclopedia encyclopedia); + + + + Encyclopedia findById(Integer encId); + + List findAllEncyclopedias(); + + List findEncyclopediaByLike(String title); + +} diff --git a/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java b/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java new file mode 100644 index 0000000..4751b99 --- /dev/null +++ b/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java @@ -0,0 +1,48 @@ +package com.ltw.zhaopin1.service.impl; + + +import com.ltw.zhaopin1.entity.Encyclopedia; +import com.ltw.zhaopin1.mapper.EncyclopediaMapper; +import com.ltw.zhaopin1.service.EncyclopediaService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service + +public class EncyclopediaServiceImpl implements EncyclopediaService { + @Autowired + private EncyclopediaMapper encyclopediamapper; + + + @Override + public int addEncyclopedia(Encyclopedia encyclopedia) { + return encyclopediamapper.add(encyclopedia); + } + + @Override + public int delEncyclopedia(Integer encId) { + return encyclopediamapper.del(encId); + } + + @Override + public int updateEncyclopedia(Encyclopedia encyclopedia) { + return encyclopediamapper.update(encyclopedia); + } + + @Override + public Encyclopedia findById(Integer encId) { + return encyclopediamapper.getById(encId); + } + + @Override + public List findAllEncyclopedias() { + return encyclopediamapper.getAllEncyclopedias(); + } + + @Override + public List findEncyclopediaByLike(String title) { + return encyclopediamapper.getEncyclopediaByLike(title); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d6e6325..01707f9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -16,6 +16,41 @@ spring: mybatis: configuration: map-underscore-to-camel-case: true - #շʽ + #�����շ�ʽ mapper-locations: classpath:mapper/*.xml type-aliases-package: com.sixteam.irs.entity + + +pring: + freemarker: + suffix: .html + + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://localhost:3306/zhaopin_enc?serverTimezone=UTC + username: root + password: 123456 + + + # thymeleaf: + # mode: HTML5 + # suffix: .html #后缀 + # encoding: UTF-8 #编码 + # cache: true #是否启用缓存 + # check-template-location: true + mvc: + view: + prefix: / + suffix: .jsp + + + + + +pageHelper: + #分页插件 + pagehelper.helper-dialect=mysql + pagehelper.params=count=countSql + pagehelper.reasonable=true + pagehelper.support-methods-arguments=true diff --git a/src/test/java/com/sixteam/irs/IrsApplicationTests.java b/src/test/java/com/ltw/zhaopin1/IrsApplicationTests.java similarity index 90% rename from src/test/java/com/sixteam/irs/IrsApplicationTests.java rename to src/test/java/com/ltw/zhaopin1/IrsApplicationTests.java index d4205c1..6430b0a 100644 --- a/src/test/java/com/sixteam/irs/IrsApplicationTests.java +++ b/src/test/java/com/ltw/zhaopin1/IrsApplicationTests.java @@ -1,4 +1,4 @@ -package com.sixteam.irs; +package com.ltw.zhaopin1; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; diff --git a/src/webapp/encyclopedia/add.jsp b/src/webapp/encyclopedia/add.jsp new file mode 100644 index 0000000..178c381 --- /dev/null +++ b/src/webapp/encyclopedia/add.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Title + + + + 标题: + 内容: + 时间: + + + + diff --git a/src/webapp/encyclopedia/encyclopediaList.jsp b/src/webapp/encyclopedia/encyclopediaList.jsp new file mode 100644 index 0000000..6550d5d --- /dev/null +++ b/src/webapp/encyclopedia/encyclopediaList.jsp @@ -0,0 +1,112 @@ +<%-- + Created by IntelliJ IDEA. + User: 86181 + Date: 2022/8/16 + Time: 11:39 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + Title + + + + + + + 查询: + + + + + + + 序号 + 标题 + 内容 + 发布时间 + 操作 + + + +<%-- ${e}--%> + + ${e.encId} + ${e.encTitle} + ${e.encContext} + ${e.encTime} + 修改 + 删除 + 删除 + + + + + + 当前 ${pageInfo.pageNum }页,总${pageInfo.pages }页,总 ${pageInfo.total } 条记录 + + 第一页 + + 上一页 + + + + 下一页 + + + 最后页 + + + + + + + \ No newline at end of file diff --git a/src/webapp/encyclopedia/updateEncyclopedia.jsp b/src/webapp/encyclopedia/updateEncyclopedia.jsp new file mode 100644 index 0000000..6b31886 --- /dev/null +++ b/src/webapp/encyclopedia/updateEncyclopedia.jsp @@ -0,0 +1,14 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %> + + + Title + + + + + 标题: + 内容:${requestScope.encyclopedia.encContext} + + + + diff --git a/src/webapp/index.jsp b/src/webapp/index.jsp new file mode 100644 index 0000000..98c7204 --- /dev/null +++ b/src/webapp/index.jsp @@ -0,0 +1,18 @@ +<%-- + Created by IntelliJ IDEA. + User: 86181 + Date: 2022/8/16 + Time: 11:18 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %> + + + + Title + + + +职场百科 + + diff --git a/src/webapp/message.jsp b/src/webapp/message.jsp new file mode 100644 index 0000000..2b35f53 --- /dev/null +++ b/src/webapp/message.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: 86181 + Date: 2022/8/16 + Time: 16:08 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %> + + + Title + + +${msg} + + -- Gitee From a19fb4137f2c48b5786d8d9f8e19a8f4da4b4b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <1489339700@qq.com> Date: Tue, 16 Aug 2022 19:42:18 +0800 Subject: [PATCH 3/4] sbsb11 --- .../com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java b/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java index 4751b99..701a845 100644 --- a/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java +++ b/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java @@ -36,6 +36,8 @@ public class EncyclopediaServiceImpl implements EncyclopediaService { return encyclopediamapper.getById(encId); } + + @Override public List findAllEncyclopedias() { return encyclopediamapper.getAllEncyclopedias(); -- Gitee From 9e7a87e56ad4ff7a349449f0f35284514463c9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <1489339700@qq.com> Date: Tue, 16 Aug 2022 19:52:47 +0800 Subject: [PATCH 4/4] 11 --- .../{ltw/zhaopin1 => sixteam/irs}/IrsApplication.java | 2 +- .../irs}/controller/EncyclopediaController.java | 6 +++--- .../zhaopin1 => sixteam/irs}/entity/Encyclopedia.java | 2 +- .../irs}/mapper/EncyclopediaMapper.java | 4 ++-- .../irs}/service/EncyclopediaService.java | 4 ++-- .../irs}/service/impl/EncyclopediaServiceImpl.java | 8 ++++---- src/main/resources/application.yml | 10 +++++----- .../zhaopin1 => sixteam/irs}/IrsApplicationTests.java | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) rename src/main/java/com/{ltw/zhaopin1 => sixteam/irs}/IrsApplication.java (92%) rename src/main/java/com/{ltw/zhaopin1 => sixteam/irs}/controller/EncyclopediaController.java (96%) rename src/main/java/com/{ltw/zhaopin1 => sixteam/irs}/entity/Encyclopedia.java (96%) rename src/main/java/com/{ltw/zhaopin1 => sixteam/irs}/mapper/EncyclopediaMapper.java (91%) rename src/main/java/com/{ltw/zhaopin1 => sixteam/irs}/service/EncyclopediaService.java (82%) rename src/main/java/com/{ltw/zhaopin1 => sixteam/irs}/service/impl/EncyclopediaServiceImpl.java (85%) rename src/test/java/com/{ltw/zhaopin1 => sixteam/irs}/IrsApplicationTests.java (90%) diff --git a/src/main/java/com/ltw/zhaopin1/IrsApplication.java b/src/main/java/com/sixteam/irs/IrsApplication.java similarity index 92% rename from src/main/java/com/ltw/zhaopin1/IrsApplication.java rename to src/main/java/com/sixteam/irs/IrsApplication.java index a5fb25b..1195710 100644 --- a/src/main/java/com/ltw/zhaopin1/IrsApplication.java +++ b/src/main/java/com/sixteam/irs/IrsApplication.java @@ -1,4 +1,4 @@ -package com.ltw.zhaopin1; +package com.sixteam.irs; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java b/src/main/java/com/sixteam/irs/controller/EncyclopediaController.java similarity index 96% rename from src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java rename to src/main/java/com/sixteam/irs/controller/EncyclopediaController.java index 635e613..bddcbdc 100644 --- a/src/main/java/com/ltw/zhaopin1/controller/EncyclopediaController.java +++ b/src/main/java/com/sixteam/irs/controller/EncyclopediaController.java @@ -1,9 +1,9 @@ -package com.ltw.zhaopin1.controller; +package com.sixteam.irs.controller; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.ltw.zhaopin1.entity.Encyclopedia; -import com.ltw.zhaopin1.service.EncyclopediaService; +import com.sixteam.irs.entity.Encyclopedia; +import com.sixteam.irs.service.EncyclopediaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; diff --git a/src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java b/src/main/java/com/sixteam/irs/entity/Encyclopedia.java similarity index 96% rename from src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java rename to src/main/java/com/sixteam/irs/entity/Encyclopedia.java index 80a2501..fa3aa1e 100644 --- a/src/main/java/com/ltw/zhaopin1/entity/Encyclopedia.java +++ b/src/main/java/com/sixteam/irs/entity/Encyclopedia.java @@ -1,4 +1,4 @@ -package com.ltw.zhaopin1.entity; +package com.sixteam.irs.entity; public class Encyclopedia { diff --git a/src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java b/src/main/java/com/sixteam/irs/mapper/EncyclopediaMapper.java similarity index 91% rename from src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java rename to src/main/java/com/sixteam/irs/mapper/EncyclopediaMapper.java index 4a9f675..74b23f4 100644 --- a/src/main/java/com/ltw/zhaopin1/mapper/EncyclopediaMapper.java +++ b/src/main/java/com/sixteam/irs/mapper/EncyclopediaMapper.java @@ -1,7 +1,7 @@ -package com.ltw.zhaopin1.mapper; +package com.sixteam.irs.mapper; -import com.ltw.zhaopin1.entity.Encyclopedia; +import com.sixteam.irs.entity.Encyclopedia; import org.apache.ibatis.annotations.*; import java.util.List; diff --git a/src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java b/src/main/java/com/sixteam/irs/service/EncyclopediaService.java similarity index 82% rename from src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java rename to src/main/java/com/sixteam/irs/service/EncyclopediaService.java index 421a5b3..7c8262b 100644 --- a/src/main/java/com/ltw/zhaopin1/service/EncyclopediaService.java +++ b/src/main/java/com/sixteam/irs/service/EncyclopediaService.java @@ -1,7 +1,7 @@ -package com.ltw.zhaopin1.service; +package com.sixteam.irs.service; -import com.ltw.zhaopin1.entity.Encyclopedia; +import com.sixteam.irs.entity.Encyclopedia; import java.util.List; diff --git a/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java b/src/main/java/com/sixteam/irs/service/impl/EncyclopediaServiceImpl.java similarity index 85% rename from src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java rename to src/main/java/com/sixteam/irs/service/impl/EncyclopediaServiceImpl.java index 701a845..211a502 100644 --- a/src/main/java/com/ltw/zhaopin1/service/impl/EncyclopediaServiceImpl.java +++ b/src/main/java/com/sixteam/irs/service/impl/EncyclopediaServiceImpl.java @@ -1,9 +1,9 @@ -package com.ltw.zhaopin1.service.impl; +package com.sixteam.irs.service.impl; -import com.ltw.zhaopin1.entity.Encyclopedia; -import com.ltw.zhaopin1.mapper.EncyclopediaMapper; -import com.ltw.zhaopin1.service.EncyclopediaService; +import com.sixteam.irs.entity.Encyclopedia; +import com.sixteam.irs.mapper.EncyclopediaMapper; +import com.sixteam.irs.service.EncyclopediaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 01707f9..b4bacc3 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,11 +1,11 @@ server: port: 80 spring: - datasource: - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql:/49.232.158.16;3306/irs?serverTimezone=UTC - username: irsadmin - password: 666 +# datasource: +# driver-class-name: com.mysql.jdbc.Driver +# url: jdbc:mysql:/49.232.158.16;3306/irs?serverTimezone=UTC +# username: irsadmin +# password: 666 thymeleaf: mode: HTML5 diff --git a/src/test/java/com/ltw/zhaopin1/IrsApplicationTests.java b/src/test/java/com/sixteam/irs/IrsApplicationTests.java similarity index 90% rename from src/test/java/com/ltw/zhaopin1/IrsApplicationTests.java rename to src/test/java/com/sixteam/irs/IrsApplicationTests.java index 6430b0a..d4205c1 100644 --- a/src/test/java/com/ltw/zhaopin1/IrsApplicationTests.java +++ b/src/test/java/com/sixteam/irs/IrsApplicationTests.java @@ -1,4 +1,4 @@ -package com.ltw.zhaopin1; +package com.sixteam.irs; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -- Gitee
当前 ${pageInfo.pageNum }页,总${pageInfo.pages }页,总 ${pageInfo.total } 条记录