摘要:
在新建springBoot项目时将Service URL的http://start.spring.io改成https://start.spring.io 阅读全文
摘要:
目的:随机产生一个整数并加入到一个队列中。 1.使用线程池: long startTime=System.currentMillis(); final List<Integer> l=new LinkedList<Integer>(); ThreadPoolExecutor tp=new Threa 阅读全文
摘要:
编写用来获取数据的接口 public interface DataBase{ //改方法用来获取数据 public void getData(); } 编写具体负责获取数据的类 public class SqlDataBase1 implement DataBase{ //该方法1用来获取数据 pu 阅读全文
摘要:
1.编写用来获取数据的接口 public interface DataBase{ //改方法用来获取数据 public void getData(); } 2.编写具体负责获取数据的类 public class SqlDataBase1 implement DataBase{ //该方法1用来获取数 阅读全文
摘要:
原因1: Application启动类的位置不对.要将Application类放在最外侧,即包含所有子包 原因:spring-boot会自动加载启动类所在包下及其子包下的所有组件. 原因2: 在springboot的配置文件:application.yml或application.propertie 阅读全文
摘要:
1.新建maven项目 新建项目报错是因为缺少web.xml文件 右键项目名 找到“”java EE Tools“” 会自动生成一个web.xml文件 2.根据这模板创建文件 3.在pom.xml文件中添加 <!--集成spring --> <dependency> <groupId>org.spr 阅读全文
摘要:
如果是这种情况将第一行去掉就可以了 阅读全文
摘要:
Redis在web中的应用 一般而言redis在java web应用中存在两个主要的场景: 缓存常用的数据 在需要高速读/写的场合使用它快速读写 在 Spring 中使用Redis (1)先用 Spring 配置一个 JedisPoolConfig 对象 <bean id="poolConfig" 阅读全文
摘要:
上传下载文件实例(vsftp服务器+nginx) 页面(上传+下载) <form action="/pic/upload" enctype="multipart/form-data" method="post"> <input type="text" name="username"><br> <in 阅读全文
摘要:
Redis的安装与启动 一、安装redis 1、检查是否有redis yum 源 1 yum install redis 2、下载fedora的epel仓库 1 yum install epel-release 3、安装redis数据库 1 yum install redis 4、安装完毕后,使用下 阅读全文