07 2022 档案
摘要:1.下载 https://www.oracle.com/java/technologies/downloads/#java8 2.创建java文件夹(usr-local)赋予高权限 chmod 777 java 3.解压文件 tar -zvxf jdk-linux-x64.tar.gz 4.配置环境
阅读全文
摘要:linux开放端口的两种方法(选其一): Linux命令: 开发端口 /sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT 保存 /etc/rc.d/init.d/iptables save 重启 /etc/init.d/iptables res
阅读全文
摘要:链接:https://pan.baidu.com/s/1_uhgZHhL8IP32-CkQOIWkw 提取码:9luk 1.下载后双击AxureRP-Setup.exe安装AxureRP 2.设置中文版本,复制lang包到安装根目录下 3.在打开《注册机-Keygen.exe》 4.输入版本名称,点
阅读全文
摘要:通过修改请求头的参数来实现返回值重写 配置类 import com.example.studywork1.pojo.User; import org.springframework.http.HttpInputMessage; import org.springframework.http.Http
阅读全文
摘要:Spring Boot 请求和请求参数处理解析 源码分析 上面请求和请求参数处理解析中已经解析到 DispatcherServlet - > doDispatch - > mappedHandler = getHandler(processedRequest); 找到请求应该由哪个个Handler处
阅读全文
摘要:配置类 @Component public class MyConfig { @Bean public WebMvcConfigurer webMvcConfigurer(){ return new WebMvcConfigurer() { @Override public void addForm
阅读全文
摘要:public class Sort { public static void sort() { Scanner input = new Scanner(System.in); int sort[] = new int[10]; int temp; System.out.println("请输入10个
阅读全文
摘要:1、新建一个word文档, 输入如下内容: (里面的Tb1开头就是我们需要替换的占位字段,这里的占位字段不要太复杂,比如${Tb123},因为后面另存为xml后,多种类型的字符会发生拆分) 2、将该word文件另存为xml格式(注意是另存为,不是直接改扩展名) 3、将xml文件的扩展名直接改为ftl
阅读全文
摘要:import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import
阅读全文
摘要:import java.math.BigDecimal; /** * 数字转换为人民币的大写 * NumberToCN.java * * @author lmg * @since 2015年11月3日 * Copyright © mizhuanglicai */ public class Numbe
阅读全文
摘要:import java.util.Random; public class MyUtil { public static String getName() { Random random = new Random(); String[] Surname = {"赵", "钱", "孙", "李",
阅读全文
摘要:import java.io.ByteArrayOutputStream; import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator; import jav
阅读全文
摘要:请求映射 1、rest使用与原理 @xxxMapping; Rest风格支持(使用HTTP请求方式动词来表示对资源的操作) 以前:/getUser 获取用户 /deleteUser 删除用户 /editUser 修改用户 /saveUser 保存用户 现在: /user GET-获取用户 DELET
阅读全文
摘要:欢迎页 index 1.在静态资源路径下添加 index.html 直接访问项目地址 在配置yml文件中配置静态资源访问前缀 spring: mvc: static-path-pattern: /res/** 两种访问方式访问后404 静态资源前缀影响欢迎页访问(当前SpringBoot版本spri
阅读全文
摘要:注解中主要的三个注解 @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExclude
阅读全文
摘要:1.第一种配置@Component+@ConfigurationProperties 配置类 @Component public class MyConfig1 { @Bean public User user(){ return new User(); } }或者在User类上加@Componen
阅读全文
摘要:xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
阅读全文
摘要:Spring容器的refresh()【创建刷新】;1、prepareRefresh()刷新前的预处理; 1)、initPropertySources()初始化一些属性设置;子类自定义个性化的属性设置方法; 2)、getEnvironment().validateRequiredProperties(
阅读全文
摘要:/** * 声明式事务: * * 环境搭建: * 1、导入相关依赖 * 数据源、数据库驱动、Spring-jdbc模块 * 2、配置数据源、JdbcTemplate(Spring提供的简化数据库操作的工具)操作数据 * 3、给方法上标注 @Transactional 表示当前方法是一个事务方法; *
阅读全文