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