自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 服务器上部署多个tomcat并启用不同端口

步骤以此为:

2020-06-04 11:12:04 354

原创 使用systemctl实现tomcat开机自启动

systemctl命令是systemd命令组中的一个,这里不再赘述。实现开机启动步骤如下:1.编写服务定义文件vim tomcat8_8080.service[Unit]Description=Tomcat8080After=network.target [Service]Type=forkingPIDFile=/usr/local/tomcat8_8080/tomcat.pidEnvironment=JAVA_HOME=/usr/local/java/jdk1.8.0_17

2020-06-04 10:29:57 734

原创 windows下nginx的安装,使用及vue工程的部署

nginx的安装与使用nginx的安装windows系统下nginx的安装非常简单,在nginx官网下载windows版本的nginx,解压即可。解压后目录如下:nginx的使用:打开命令行,进入nginx所在目录cdD:\nginx-1.18.0执行相应语句:启动nginx:start nginx强制停止:nginx -s stop正常停止: nginx -s quit配置文件修改重装载: nginx -s reloadvue工程的部署要将...

2020-05-26 14:11:45 822

原创 Nacos作为注册中心

主要是看网上别人的博客,未经尝试。先看一张关于springcloud的图,里面列出了一个电商系统中各个springcloud组件与微服务间关系。注册中心(服务发现)微服务架构需要面对的第一个问题就是微服务间无法知道其他微服务的存在和ip地址,所以微服务架构的一个重要组件就是注册中心,用来负责微服务的注册和发现。注册中心主要记录微服务的ip地址和端口号。常用的注册中心有nacos和eureka,下面的截图是在nacos中注册了一个gateway-admin的服务后的截图Nacos的

2020-05-20 16:40:21 1485

原创 leetcode 509 斐波那契数列

这道题第一反应是用递归,但是递归时间复杂度会是2^n,且会有大量重复计算。考虑动态规划,倒过来从开头开始一个个计算即可。需要注意题目要求要模1000000007,且int可能会溢出。class Solution { public int fib(int n) { int[] fibArray = new int[n]; if(n == 0){ ...

2020-03-09 12:00:20 81

原创 Spring IoC的实现剖析

1、IOC的技术实现方式“伙计,来杯啤酒!”当你来到酒吧,想要喝杯啤酒的时候,通常会直接招呼服务生,让他为你送来一杯清凉解渴的啤酒。同样地,作为被注入对象,要想让IoC容器为其提供服务,并将所需要的被依赖对象送过来,也需要通过某种方式通知对方。如果你是酒吧的常客,或许你刚坐好,服务生已经将你最常喝的啤酒放到了你面前如果你是初次或偶尔光顾,也许你坐下之后还要招呼服务生,“Waiter...

2019-04-30 14:26:23 111

转载 Spring IoC有什么好处?

要了解控制反转( Inversion of Control ), 我觉得有必要先了解软件设计的一个重要思想:依赖倒置原则(Dependency Inversion Principle )。什么是依赖倒置原则?假设我们设计一辆汽车:先设计轮子,然后根据轮子大小设计底盘,接着根据底盘设计车身,最后根据车身设计好整个汽车。这里就出现了一个“依赖”关系:汽车依赖车身,车身依赖底盘,底盘依赖轮子。...

2019-04-30 14:08:49 138

转载 sql获取每一个类别中值最大的一条数据

本文转载自:https://blog.csdn.net/rocling/article/details/81986581,增加了问题描述,方便读者更好理解,如有曲解作者原意,请联系我修改。 问题描述:当数据表中某数据列分为几类时,如果要获取每一类中,数值最大(或最小)的一行数据,应该如何获取?/*数据如下:name val memoa 2 a2(a的第二个值)a ...

2019-01-07 11:19:15 14572 7

原创 LeetCode 182. Duplicate Emails

问题描述:Write a SQL query to find all duplicate emails in a table named Person.+----+---------+| Id | Email |+----+---------+| 1 | a@b.com || 2 | c@d.com || 3 | a@b.com |+----+---------+...

2019-01-05 11:46:46 108

原创 LeetCode 620. Not Boring Movies

问题描述:X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descriptions.Please write a SQL query to output ...

2019-01-05 11:20:44 128

转载 mysql操作查询结果case when then else end用法举例

转载自https://www.cnblogs.com/clphp/p/6256207.html,侵删。Case具有两种格式。简单Case函数和Case搜索函数。 --简单Case函数 CASE sex          WHEN '1' THEN '男'          WHEN '2' THEN '女' ELSE '其他' END --Case搜索函数 CASE WHEN s...

2019-01-05 11:05:24 236

原创 LeetCode 627. Swap Salary

问题描述:Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with a single update query and no inter...

2019-01-05 11:03:09 157

原创 LeetCode 832. Flipping an Image

问题描述:Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.To flip an image horizontally means that each row of the image is reversed.  Fo...

2019-01-05 10:21:22 121 1

原创 LeetCode 665. Non-decreasing Array

问题描述:Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i] <= array[i + 1] hold...

2019-01-05 05:19:27 119

原创 SpringBoot 使用模板的情况下 调用静态资源的方法

问题描述:最近在开发SpringBoot项目时,使用了freemarker作为模板引擎,但此时出现问题,html文件无法引用js库,会报No mappring found for HttpRequest with URI ...原因:使用模板后,js库的引用要使用绝对路径,不能使用相对路径。解决方法:SpringBoot2.0下,yml文件增加spring: mvc: st...

2019-01-03 17:34:29 526

原创 LeetCode 392.IsSequence

问题描述:Given a string s and a string t, check if s is subsequence of t.You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,000) st...

2019-01-02 21:48:02 204

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除