一、建立数据库 二、登陆时密码校验 2.1 post请求提交表单 2.2 获取登陆用户名及密码,并进行验证 Service层: 核心代码: public class LoginServiceImpl implements LoginService { private UserMapper userM ...
分类:
其他好文 时间:
2020-06-03 00:37:18
阅读次数:
70
//龟兔赛跑public class Race implements Runnable{ private static String winner; @Override public void run() { for (int i = 0; i <= 100 ;) { //模拟兔子休息 if (Th ...
分类:
编程语言 时间:
2020-05-31 21:29:04
阅读次数:
92
[设计模式]工厂模式 一、简单工厂模式(静态工厂模式) 车的接口 public interface Car { void name(); } 车接口的三个实现类 public class BYD implements Car{ @Override public void name() { Syste ...
分类:
其他好文 时间:
2020-05-31 13:02:11
阅读次数:
54
在开发中,很多时候会异步处理一些业务需求,在不影响主业务的情况下,还需要做一些附加的耗时长的操作,可以在主代码中 开一个线程(主要有三种线程): 1.new ARunnable类,实现Runnable接口,复写run方法: public class ARunnable implements Runn ...
分类:
编程语言 时间:
2020-05-31 11:28:19
阅读次数:
79
一、龟兔赛跑 package cn.xej.thread; public class Rice implements Runnable{ private int rSpeed = 5; //兔子速度 private int gSpeed = 2; //乌龟速度 private int rSum = ...
分类:
编程语言 时间:
2020-05-31 11:05:30
阅读次数:
62
public class User implements Comparable{ private String name; private int age; public User() { } public User(String name, int age) { this.name = name; ...
分类:
编程语言 时间:
2020-05-30 22:19:46
阅读次数:
85
定义 package java.util.concurrent; public class CopyOnWriteArrayList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable { /*/ } JUC 中的 ...
分类:
编程语言 时间:
2020-05-30 01:02:37
阅读次数:
58
这期比上一期更加简洁,但是功能更加完善,该加的异常处理也都加上了 class ListArrays implements Lists{ private Object[] data; // 集合大小 private int size; // 集合使用大小 private int index; // 初 ...
分类:
其他好文 时间:
2020-05-28 23:51:48
阅读次数:
76
方法1: implements ServletRequestAware, ServletResponseAware public class Hello implements ServletRequestAware, ServletResponseAware { private HttpServle ...
分类:
编程语言 时间:
2020-05-28 16:47:07
阅读次数:
76
1、自定义类实现RequestInterceptor接口类: @Component public class FeignInterceptor implements RequestInterceptor{ @Override public void apply(RequestTemplate tem ...
分类:
编程语言 时间:
2020-05-28 16:41:25
阅读次数:
108