![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
正人君子!
本人精通各种语言输出hello,world
展开
-
java生成稀疏数组与还原
主函数public static void main(String[] args) { //稀疏数组 //行 列 有效个数 //行 列 数据 int [][] array1=new int[11][11]; array1[1][2]=1; array1[2][3]=2; array1[1][3]=1; array1[2][4]=2; System.out.prin原创 2021-11-17 23:27:21 · 338 阅读 · 0 评论 -
SpringBoot简单邮件发送
1、导包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency>2、配置yaml文件spring: mail: username: QQ邮箱 passwo原创 2021-11-06 11:47:26 · 130 阅读 · 0 评论 -
Swagger笔记
因为使用的是swagger3.0所以需要多导入一个包springfox-boot-starter新版访问swagger路径为http://localhost:8081/swagger-ui/index.htm <!--导入swagger包--> <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --> <dependency>原创 2021-11-05 16:47:42 · 95 阅读 · 0 评论 -
SpringBoot国际化
1、首先设置号idea的字符格式2、在resources下创建login.properties、login_zh_CN.properties、login_en_US.properties3、静态资源设置<body class="text-center"> <form class="form-signin" action="dashboard.html"> <h1 class="h3 mb-3 font-weight-normal" th:text="#{原创 2021-10-29 16:10:45 · 125 阅读 · 0 评论 -
SpringBoot控制台打印输出项目启动路径
SpringBoot控制台打印输出项目启动路径 ConfigurableApplicationContext application= SpringApplication.run(Springboot04WebApplication.class, args); Environment env = application.getEnvironment(); String ip = InetAddress.getLocalHost().getHostAddress();原创 2021-10-28 11:22:57 · 677 阅读 · 0 评论 -
spring+springmvc+mybatis 整合SSM框架
环境:IDEA + MySQL 8.0.23 +Tomcat 9 + Maven 3.6基本环境搭建1、新建一Maven项目 添加web的支持2、导入相关的pom依赖<dependencies> <!--Junit--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> ..原创 2021-10-09 17:42:24 · 102 阅读 · 0 评论 -
SpringMvcJSON交互处理
Controller返回JSON数据Jackson应该是目前比较好的json解析工具了当然工具不止这一个,比如还有阿里巴巴的 fastjson 等等。我们这里使用Jackson,使用它需要导入它的jar包;<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --><dependency> <groupId>com.fasterxml.jackson.原创 2021-10-09 10:01:55 · 83 阅读 · 0 评论 -
JAVA自定义过滤器
package com.kuang.filter;import javax.servlet.*;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRequestWrapper;import javax.servlet.http.HttpServletResponse;import java.io.IOException;import java.io.UnsupportedEncodi转载 2021-10-09 17:43:25 · 815 阅读 · 0 评论 -
HTML(jsp)+Ajax异步+Servlet+JavaBean+JDBC+Mysql实现的JavaWeb个人博客项目
基于HTML+javaServlet+JavaBean+JDBC实现的个人博客项目大致框架以及包博客整体使用AJAX与后台交互数据路径使用@WebServlet注解的方式一个功能一个Servlet前台界面文章界面评论区时间轴留言板后台界面完整的登录功能实现Servletpackage com.wu.web;import com.wu.bean.User;import com.wu.service.UserService;import com.wu.se原创 2020-12-01 19:20:09 · 797 阅读 · 3 评论