程序小茉莉 2021-09-20 04:18:57 阅读数:889
}
package com.yusael.utils;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Random;
public class ValidateImageCodeUtils {
}
package com.yusael.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
// 直接訪問templates下的靜態頁面是無法獲取static中的樣式的
// 用該控制器進行去訪問, 該控制器沒有其他作用, 只是為了訪問界面而已
@Controller
public class IndexController {
}
package com.yusael.controller;
import com.yusael.entity.User;
import com.yusael.service.UserService;
import com.yusael.utils.ValidateImageCodeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.awt.image.BufferedImage;
import java.io.IOException;
@Controller
@RequestMapping(“/user”)
public class UserController {
}
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “ http://www.w3.org/TR/html4/loose.dtd”>
<html lang=“en” xmlns:th=“ http://www.thymeleaf.org”>
<head>
</head>
<body>
<div id=“wrap”>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “ http://www.w3.org/TR/html4/loose.dtd”>
<html xmlns:th=“ http://www.thymeleaf.org”>
CodeChina開源項目:【一線大廠Java面試題解析+核心總結學習筆記+最新講解視頻】
版权声明:本文为[程序小茉莉]所创,转载请带上原文链接,感谢。 https://gsmany.com/2021/09/20210920041856451A.html