2024 0101 23:56

main
Mth Zhang 11 months ago
parent 815843348f
commit b61cee0454

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>logistics-parent</artifactId>
<groupId>com.zhangzeyuan</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logistics-common</artifactId>
<dependencies>
<!-- 时间操作组件 -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<!-- Apache工具组件 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</dependency>
<!-- Jackson Json处理工具包 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- 单元测试 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- 日志处理 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>logistics-parent</artifactId>
<groupId>com.zhangzeyuan</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logistics-manager-dao</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.zhangzeyuan</groupId>
<artifactId>logistics-manager-pojo</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- Mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</dependency>
<dependency>
<groupId>com.github.miemiedev</groupId>
<artifactId>mybatis-paginator</artifactId>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
</dependency>
<dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
</dependency>
<!-- MySql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>logistics-manager</artifactId>
<groupId>com.zhangzeyuan</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logistics-manager-pojo</artifactId>
</project>

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>logistics-manager-dao</artifactId>
<groupId>com.zhangzeyuan</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logistics-manager-service</artifactId>
<!-- 添加相关的依赖 -->
<dependencies>
<dependency>
<groupId>com.zhangzeyuan</groupId>
<artifactId>logistics-manager-dao</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- 添加Spring的相关依赖 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>logistics-parent</artifactId>
<groupId>com.zhangzeyuan</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logistics-manager</artifactId>
<dependencies>
<dependency>
<groupId>com.zhangzeyuan</groupId>
<artifactId>logistics-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zhangzeyuan</groupId>
<artifactId>logustucs-manager-web</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>logustucs-manager-web Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<!--<build>
<finalName>logustucs-manager-web</finalName>
<pluginManagement>&lt;!&ndash; lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) &ndash;&gt;
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
&lt;!&ndash; see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging &ndash;&gt;
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>-->
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/</path>
<port>8082</port>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -7,21 +7,45 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<version>2.4.5</version>
</parent>
<groupId>org.zhangzeyuan</groupId>
<artifactId>springboot01</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<java>1.8</java>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!--如果打war包,排除web启动中自动依赖的tomcat插件-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
手动依赖tomcat插件但是表明项目打包时该依赖不会被打进去目的主要是保证开发阶段本地SpringBoot
项目可以正常运行
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--打包的时候可以不用包进去,别的设施会提供。事实上该依赖理论上可以参与编译,测试,运行等周期。
相当于compile但是打包阶段做了exclude操作-->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency><dependency>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.3</version>
@ -74,6 +98,12 @@
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.4.5</version>
<optional>true</optional>
</dependency>
</dependencies>
@ -82,6 +112,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>

@ -1,7 +1,11 @@
package com.zhangzeyuan;
import com.zhangzeyuan.pojo.Emp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;
/**
@ -11,8 +15,21 @@ import org.springframework.stereotype.Component;
*/
@SpringBootApplication
//@Component("com.zhangzeyuan.mapper")
public class SpringBoot01Application {
public class SpringBoot01Application extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringBoot01Application.class);
}
public static void main(String[] args) {
SpringApplication.run(SpringBoot01Application.class, args);
ConfigurableApplicationContext run = SpringApplication.run(SpringBoot01Application.class, args);
Emp bean = run.getBean("com.zhangzeyuan.pojo.Emp",Emp.class);
System.out.println(bean);
String[] beanDefinitionNames = run.getBeanDefinitionNames();
for (String beanDefinitionName : beanDefinitionNames) {
System.out.println(beanDefinitionName);
}
}
}

@ -0,0 +1,15 @@
package com.zhangzeyuan.config;
import com.zhangzeyuan.pojo.Emp;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
/**
* @Author ZZY_1
* @Date 2024/1/1 10:21
* @Version 1.0
*/
@Configuration(proxyBeanMethods = true)
@Import(Emp.class)
public class MyConfiguration {
}

@ -5,7 +5,6 @@ import com.zhangzeyuan.pojo.Emp;
import com.zhangzeyuan.service.EmpService;
import org.springframework.stereotype.Controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@ -16,7 +16,7 @@ import java.util.Map;
* @Date 2023/12/30 17:37
* @Version 1.0
*/
@Controller
@Controller("/freemarker.do")
public class FreemarkerController {
@Autowired
private EmpService empService;

@ -2,7 +2,6 @@ package com.zhangzeyuan.controller;
import com.zhangzeyuan.pojo.User;
import com.zhangzeyuan.service.UserService;
import com.zhangzeyuan.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@ -1,8 +1,20 @@
package com.zhangzeyuan.controller;
import com.github.pagehelper.PageInfo;
import com.zhangzeyuan.pojo.Emp;
import com.zhangzeyuan.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -10,11 +22,49 @@ import java.util.Map;
* @Date 2023/12/30 19:19
* @Version 1.0
*/
@Controller
@RequestMapping("/thymeleaf.do")
@Controller()
public class ThymeleafController {
@Autowired
private EmpService empService;
@RequestMapping("/showIndex")
public String showIndex(Map<String,Object> map) {
public String showIndex(Map<String,Object> map, HttpServletRequest req, HttpSession session) {
// 向request域放数据
req.setAttribute("msg", "requestMessage");
// 向session域放数据
session.setAttribute("msg", "sessionMessage");
// 向application域放数据
req.getServletContext().setAttribute("msg", "applicationMessage");
map.put("msg", "testMessage");
int i = 1 / 0;
return "index";
}
@RequestMapping("/findAllEmp")
public String findAll(Map<String,Object> map){
List<Emp> emps = empService.findAll();
map.put("emps", emps);
return "showEmpThyme";
}
@RequestMapping("/findEmp")
public String findEmp(Map<String,Object> map){
Emp emp = empService.findByEmpno(7839);
map.put("emp", emp);
return "showEmpThyme";
}
@RequestMapping("removeEmp")
public ModelAndView removeEmp(String empno,String ename){
ModelAndView mv = new ModelAndView();
System.out.println("removeEmp");
System.out.println(empno+":"+ename);
Boolean bool= empService.removeEmp(empno, ename);
mv.setViewName("redirect:findAllEmp");
if (!bool){
Map<String, Object> model = mv.getModel();
model.put("error", "删除失败");
return mv;
}
return mv;
}
}

@ -0,0 +1,31 @@
package com.zhangzeyuan.interceptors;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Author ZZY_1
* @Date 2023/12/31 22:09
* @Version 1.0
*/
@Component
public class MyInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
return false;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
}
}

@ -0,0 +1,26 @@
package com.zhangzeyuan.interceptors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @Author ZZY_1
* @Date 2023/12/31 22:11
* @Version 1.0
*/
@Component
public class MyInterceptorConfig implements WebMvcConfigurer {
@Autowired
MyInterceptor myInterceptor;
//配置拦截器的路径
@Override
public void addInterceptors(InterceptorRegistry registry) {
InterceptorRegistration interceptorRegistration =
registry.addInterceptor(myInterceptor).addPathPatterns("/**").excludePathPatterns("/login");
}
}

@ -13,4 +13,8 @@ import java.util.List;
@Mapper
public interface EmpMapper {
List<Emp> findAll();
Emp findByEmpno(int i);
int removeEmp(String empno, String ename);
}

@ -13,4 +13,8 @@ import java.util.List;
public interface EmpService {
PageInfo<Emp> findByPage(Integer pageNum, Integer pageSize);
List<Emp> findAll();
Emp findByEmpno(int i);
Boolean removeEmp(String empno, String ename);
}

@ -46,4 +46,16 @@ public class EmpServiceImpl implements EmpService {
List<Emp> list =empMapper.findAll();
return list;
}
@Override
public Emp findByEmpno(int i) {
Emp emp = empMapper.findByEmpno( i);
return emp;
}
@Override
public Boolean removeEmp(String empno, String ename) {
int i = empMapper.removeEmp(empno, ename);
return i>0;
}
}

@ -3,9 +3,18 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhangzeyuan.mapper.EmpMapper">
<!-- <resultMap id=""></resultMap>-->
<delete id="removeEmp">
delete from emp where empno = #{empno} and ename =#{ename}
</delete>
<!-- <resultMap id=""></resultMap>-->
<select id="findAll" resultType="emp">
select * from emp
</select>
<select id="findByEmpno" resultType="com.zhangzeyuan.pojo.Emp">
select * from emp
<where>
empno = #{param1}
</where>
</select>
</mapper>

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
您的电脑将要10s内爆炸
</body>
</html>

@ -5,8 +5,19 @@
<title>Title</title>
</head>
<body>
this is first thymeleaf!
<span th:text="pageMessage"></span>
<span th:text="${msg}"></span>
this is first thymeleaf!<br/>
<!--<span th:text="pageMessage"></span>
<span th:text="${msg}"></span>-->
<br/> request:
<span th:text="${#httpServletRequest.getAttribute('msg')}"> </span>
<span th:text="${#request.getAttribute('msg')}"> </span>
<span th:text="${msg}"> </span>
<br/> session:
<span th:text="${#httpSession.getAttribute('msg')}"> </span>
<span th:text="${#session.getAttribute('msg')}"> </span>
<span th:text="${session.msg}"> </span>
<br/> applcation:
<span th:text="${#servletContext.getAttribute('msg')}"> </span>
<span th:text="${application.msg}"> </span>
</body>
</html>

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<style type="text/css">
#empTable{
width: 80%;
border: 1px solid blue;
margin: 0px auto;
}
#empTable th,td{
border: 1px solid green;
text-align: center;
}
</style>
<body>this is first thymeleaf!
<span th:if="${emp} != null">
工号:<span th:text="${emp.empno}"></span>
:<span th:text="${emp.ename}"></span>
:<span th:text="${emp.job}"></span>
:<span th:text="${emp.hiredate}"></span>
:<span th:text="${emp.sal}"></span>
:<span th:text="${emp.comm}"></span>
:<span th:text="${emp.mgr}"></span>
</span>
<span th:if='${emps} !=null'>
<span th:if=" ${emps[0]}!=null">
工号:<span th:text="${emps[0].empno}"></span>
:<span th:text="${emps[0].ename}"></span>
:<span th:text="${emps[0].job}"></span>
:<span th:text="${emps[0].hiredate}"></span>
:<span th:text="${emps[0].sal}"></span>
:<span th:text="${emps[0].comm}"></span>
:<span th:text="${emps[0].mgr}"></span>
</span>
</span>
<table id="empTable" cellspacing="0px" cellpadding="0px">
<tr>
<th>索引</th>
<th>序号</th>
<th>总人数</th>
<th>偶数索引?</th>
<th>奇数索引?</th>
<th>第一?</th>
<th>最后?</th>
<th>工号</th>
<th>姓名</th>
<th>职务</th>
<th>上级</th>
<th>入职日期</th>
<th>year</th>
<th>month</th>
<th>day</th>
<th>工资</th>
<th>补助</th>
<th>部门号</th>
<th> </th>
</tr>
<tr th:each="emp,i:${emps}" th:class="${i.odd}?a:b">
<td th:text="${i.index}"></td>
<td th:text="${i.count}"></td>
<td th:text="${i.size}"></td>
<td th:text="${i.odd}"></td>
<td th:text="${i.even}"></td>
<td th:text="${i.first}"></td>
<td th:text="${i.last}"></td>
<td th:text="${emp.empno}"></td>
<td th:text="${emp.ename}"></td>
<td th:text="${emp.job}"></td>
<td th:text="${#strings.isEmpty(emp.mgr)?'老板':emp.mgr}"></td>
<td th:text="${#dates.format(emp.hiredate,'yyyy-MM-dd')}"></td>
<td th:text="${#dates.year(emp.hiredate)}"></td>
<td th:text="${#dates.month(emp.hiredate)}"></td>
<td th:text="${#dates.day(emp.hiredate)}"></td>
<td th:text="${#numbers.formatDecimal(emp.sal,7,'COMMA',2,'POINT')}"></td>
<td th:text="${emp.comm}"></td>
<td th:text="${emp.deptno}"></td>
<td><a href="javascript:void(0)" th:onclick="removeEmp([[${emp.empno}]],[[${emp.ename}]])" >删除</a></td>
</tr>
<script>
function removeEmp(empno,ename) {
var result = confirm("确定要删除编号为:"+empno+"的"+ename);
if (result) {
window.location.href = "removeEmp?empno=" + empno + "&ename=" + ename;
}
}
</script>
<hr/>
</table>
</body>
</html>

@ -0,0 +1,29 @@
package com.zhangzeyuan;
import com.zhangzeyuan.pojo.Emp;
import com.zhangzeyuan.service.EmpService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
/**
* @Author ZZY_1
* @Date 2023/12/31 21:58
* @Version 1.0
*/
@SpringBootTest(classes = SpringBoot01Application.class)
public class SpringBoot01ApplicationTest {
@Autowired
private EmpService empService;
@Test
public void testFindAll() {
List<Emp> list = empService.findAll();
list.forEach(System.out::println);
}
}
Loading…
Cancel
Save