Enterprise spring boot tutorial spring boot integrates mongodb

Preparation Install MongoDB jdk 1.8 maven 3.0 idea Environmental dependence Introduce spring boot starter data mongodb dependency in pom file: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </depen ...

Posted by penguinmasta on Mon, 09 Dec 2019 06:08:11 +0100

Docker common command quick reference manual

Record the daily use commands of docker. This article is mainly for linux + mac operating system. It is not sure whether window is applicable. Use it carefully <!-- more --> 1. docker process Three common case s are docker process start, stop and restart # Start docker service docker start # Shutdown docker service docker stop # Restart d ...

Posted by nykoelle on Mon, 09 Dec 2019 06:07:27 +0100

State mode of design mode

concept The behavior of a class changes based on its state The main idea is to abstract all kinds of concrete state classes. That is, there will be many state classes. Usage scenarios Code contains a large number of conditional statements related to object state Behavior changes with state Characteristic States can be transformed from one ...

Posted by clio-stylers on Sun, 08 Dec 2019 07:21:11 +0100

Spring boot 2.0 integrates jackson configuration date formatting and deserialization

There are many different opinions on the Internet. Most of them are copied back and forth. There is no practice. Recently, in the project, we frequently encountered the problem of boot+jackson processing date, so we opened this post. The first is POM. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/PO ...

Posted by UseeHere on Sun, 08 Dec 2019 06:36:09 +0100

Whether you change jobs at the end of the year or not

1. Single case mode What is singleton mode? In short, ensure that classes defined as singleton patterns have and only have one instance in the program. Features of single case mode: Only one instance (only one object can be created) Self instantiation (class constructor private) Static methods for obtaining instances 2. Implementation o ...

Posted by konqest on Sun, 08 Dec 2019 04:44:17 +0100

Nginx access log and cutting, static files do not record log and set expiration time

Nginx access log View the current log format in the main profile Search log? Format [root@test-a /]# cd /usr/local/nginx/ [root@test-a nginx]# vim conf/nginx.conf include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 3526; server_names_hash_max_size 4096; log_format combined_realip '$remote_addr $http_x_forwa ...

Posted by plus2net on Sun, 08 Dec 2019 00:34:19 +0100

SpringBoot Source Text: Deep analysis of how SpringBoot eliminates web.xml

1. Preface Start with this blog post and officially start the Spring and SpringBoot Source Analysis journey.This may be a long process, because I have read the source code before is very one-sided, Spring source does not have a systematic understanding.From the beginning of this article, I will keep updating and strive to have a systematic und ...

Posted by xeelee on Fri, 06 Dec 2019 12:36:19 +0100

[question 50] the first character that only appears once

[title] Find the first character that appears only once in a string (0 < = string length < = 10000, all composed of letters) and return its position. If not, return - 1 (case sensitive) [thinking] You can count the number of occurrences of each character in a string, 1. Use two list s to record the characters that have app ...

Posted by clarket on Thu, 05 Dec 2019 13:32:44 +0100

Build your own git server with Gogs

1. Configure the environment required by Gogs Install nginx sudo apt-get install nginx Install git sudo apt-get install git Install MySQL sudo apt-get install mysql-server # Install mysql mysql -u root -p # Connect to database SET GLOBAL storage_engine = 'InnoDB'; # Set the database mode to InnoDB CREATE DATABASE gogs CHARACTER SET utf ...

Posted by yonta on Thu, 05 Dec 2019 01:50:22 +0100

Recommend a tool class for java to operate ftp

Written in front As children's shoes that often use computers to organize files, they should have used to upload and download files from the ftp server. Today, we will learn how to operate files of ftp service through java programs First of all, you should know the ip, path, port, account and password with operation permission of ftp 1 import ...

Posted by tmallen on Wed, 04 Dec 2019 11:53:15 +0100