Tag:springboot

  • Example of fastdfs procedure code integrated with springboot

    Time:2021-5-10

    This article mainly introduces the spring boot integration fastdfs process code example, the article through the example code introduction is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Pom.xml introduces dependency <dependency> <groupId>com.github.tobato</groupId> <artifactId>fastdfs-client</artifactId> <version>1.26.1-RELEASE</version> </dependency> Application.properties configuration #Fastdfs configuration fdfs.connect-timeout=600 fdfs.so-timeout=1500 fdfs.trackerList=192.168.1.207:22122 fdfs.thumbImage.height=150 fdfs.thumbImage.width=150 […]

  • How to deploy external Tomcat process based on springboot

    Time:2021-5-7

    This article mainly introduces the process analysis of spring boot deployed to external Tomcat in the form of war package. The sample code is introduced in great detail in this article, which has a certain reference learning value for everyone’s study or work. Friends who need it can refer to it Springboot projects can be […]

  • Example analysis of the method of configuring Druid data source with springboot

    Time:2021-5-2

    This paper describes the method of configuring the Druid data source with springboot. The details are as follows: Druid is an open source database connection pool of Alibaba. Integration of Druid data source process during development. 1. Modify pom.xml <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.26</version> </dependency> Add the above configuration. 2. Edit and […]

  • Instance analysis of docker deployment spring boot project

    Time:2021-4-25

    This article mainly introduces the docker deployment spring boot project instance analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Create project pom.xml <?xml version=”1.0″ encoding=”UTF-8″?> <project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd”> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.9.RELEASE</version> <relativePath/> <!– […]

  • Understand the principle of springboot startup through code examples

    Time:2021-4-19

    This article mainly introduces how to understand the spring boot startup principle through code examples. The example code is introduced in great detail, which has a certain reference learning value for everyone’s study or work. Friends in need can refer to it Compared with spring, springboot has many advantages, such as automatic configuration, jar running […]

  • Two examples of spring boot unit test

    Time:2021-4-16

    This article mainly introduces two methods of springboot unit test, and explains the examples in detail. The example code is introduced in great detail, which has a certain reference learning value for everyone’s study or work. If you need a friend, you can refer to it Spring boot unit test, here are two ways, one […]

  • Analysis of test class instance of springboot project

    Time:2021-4-10

    This article mainly introduces the spring boot project test class instance analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to 1. package soundsystem; import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes=CDPlayerConfig.class) […]

  • The method of using Hikari connection pool in springboot 2.0 (replacing Druid)

    Time:2021-4-9

    1. The default connection pool of springboot 2.0 is Hikari, so you don’t need to rely on parents 2. Post my own configuration (time unit is MS) # jdbc_config datasource spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://127.0.0.1:3306/datebook?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull spring.datasource.username=root spring.datasource.password=root # Hikari will use the above plus the following to setup connection pooling spring.datasource.type=com.zaxxer.hikari.HikariDataSource spring.datasource.hikari.minimum-idle=5 spring.datasource.hikari.maximum-pool-size=15 spring.datasource.hikari.auto-commit=true spring.datasource.hikari.idle-timeout=30000 spring.datasource.hikari.pool-name=DatebookHikariCP spring.datasource.hikari.max-lifetime=1800000 spring.datasource.hikari.connection-timeout=30000 […]

  • Analysis of spring boot test class without bean injection

    Time:2021-4-3

    This article mainly introduces the spring boot test class does not bean injection problem analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Other messy configuration will not pull, first on the project structure diagram After configuring the […]

  • Examples and analysis of spring boot multi file upload code

    Time:2021-3-18

    This article mainly introduces the spring boot multi file upload code examples and analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to I. explanation Spingmvc supports file upload, which is implemented through the Commons multipart resolver of apach’s […]

  • Implementation of simple second kill system by integrating redis with springboot

    Time:2021-3-16

    This example for you to share the spring boot integration redis simple seckill system specific code, for your reference, the specific content is as follows The project has an address. I’ll put it at the end of the article 1. Direct service. We will introduce two second kill modes public interface GoodsService { /** *Second […]

  • Springboot uses redisson to realize distributed lock (seckill system)

    Time:2021-3-12

    We have finished the implementation of redis’s distributed lock. Next, we will talk about the implementation of redisson’s distributed lock. Generally speaking, we use redisson’s distributed lock more. The official of redis also suggests that we do this. At the redisson point, I can jump directly to the official redisson document. 1.1 introduction of Maven […]