
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 · 388 阅读 · 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 · 187 阅读 · 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 · 164 阅读 · 0 评论 -
SpringBoot国际化
1、首先设置号idea的字符格式 2、在resources下创建login.properties、login_zh_CN.properties、login_en_US.properties 3、静态资源设置 <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 · 184 阅读 · 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 · 789 阅读 · 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 · 165 阅读 · 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 · 117 阅读 · 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 · 880 阅读 · 0 评论 -
HTML(jsp)+Ajax异步+Servlet+JavaBean+JDBC+Mysql实现的JavaWeb个人博客项目
基于HTML+javaServlet+JavaBean+JDBC实现的个人博客项目 大致框架以及包 博客整体使用AJAX与后台交互数据 路径使用@WebServlet注解的方式 一个功能一个Servlet 前台界面 文章界面 评论区 时间轴 留言板 后台界面 完整的登录功能实现 Servlet package com.wu.web; import com.wu.bean.User; import com.wu.service.UserService; import com.wu.se原创 2020-12-01 19:20:09 · 927 阅读 · 3 评论