Spring Boot with external Tomcat

In this article, I'll run the Spring Boot application on an external Tomcat.For me, this is a real situation and I have to solve this problem, so I also consulted a good teacher and got a lot of help.I hope you can provide some useful information when you encounter similar problems. Let's look at some common problems you might encounter when st ...

Posted by thestars on Thu, 09 Jan 2020 07:48:14 +0100

SpringBoot 2.X Integration Mybatis

1. Create a project environment Check Web, Mybatis, MySQL as follows Depends on the following <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>mysql&lt ...

Posted by mecha_godzilla on Wed, 08 Jan 2020 00:52:23 +0100

Code generator

Talk about the code generator, some technical solutions, details Interface Overview Checklist Code structure Generic code target In order to simplify the code and generate template code, we have code generator. premise The premise of code generator is that there are already some templated and standardized code. Such as general DAO layer, S ...

Posted by cfemocha on Tue, 07 Jan 2020 02:41:56 +0100

Initialization and destruction of Spring Bean

A little bit of eye In the development process, it is often encountered to do some necessary operations before or after the Bean is used. Spring provides support for the operation of the Bean's life cycle. 1. Java configuration mode: use initMethod and destroyMethod of @ Bean. 2. Annotation method: use JSR-250's @ PostConstr ...

Posted by alireza on Tue, 07 Jan 2020 00:58:03 +0100

How to debug so many Spring Cloud microservice interfaces?

Preface Today, let's talk about the debugging and management of service interface under Spring Cloud microservice! We know that under the microservice architecture, the software system will be divided into many independent running services, and these services need to communicate with each other, so they need to define a variety of service inte ...

Posted by martincrumlish on Mon, 06 Jan 2020 19:09:29 +0100

[original by HAVENT] spring boot + spring Kafka asynchronous configuration

Recently, our project team used Kafka to manage the system log uniformly, but the Kafka cluster (3 servers) was hung up due to the unexpected disaster, which was comparable to the rhythm of winning the prize. Then, all the services using Kafka to send message log were stuck. After investigation, it was found that Kafka crashed and caused the ca ...

Posted by manchesterkid on Mon, 06 Jan 2020 09:51:35 +0100

Using zuul to aggregate multiple swagger api documents of microservices into one document

First, look at the renderings: Myc order: on behalf of order service Myc user: on behalf of user service Myc car: representative car service ... and so on. Let me briefly talk about the integration steps and key points. 1. Add the following dependencies to the pom of each service. <dependency> <groupId>io.s ...

Posted by etully on Sun, 05 Jan 2020 04:47:00 +0100

[Spring Boot Unit Test] 1. Write unit tests

Writing unit tests can help developers write high-quality code, improve code quality, reduce bugs, and facilitate refactoring.Spring Boot provides utilities and annotations to help us test applications. Opening unit tests in Spring Boot requires only the introduction of spring-boot-starter-test, which includes some of the mainstream test librar ...

Posted by suzuki on Sat, 04 Jan 2020 18:59:07 +0100

JavaLib | use AOP to help you log

This time, let's go straight to the point. First step Using this module, you need to add package dependency: The second step You need to tell me your pointcut (inherit LBaseWebLogAspect, implement pointCut() method, and configure your pointcut) @Aspect @Component class WebLogAspect extends LBaseWebLogAspect { @Pointcut("execution(* com.fe ...

Posted by ryanlwh on Sat, 04 Jan 2020 11:04:36 +0100

ActiveMQ (XI) -- how to start Broker

Broker: equivalent to an ActiveMQ server instance Command line start parameter instance: 1. / ActiveMQ start: use the default activemq.xml to start 2. / ActiveMQ start xbean: File:.. / conf / activemq-2.xml use the specified configuration file to start 3. If file is not specified, that is, xbean:activemq-2.xml, then XML must b ...

Posted by something on Sat, 04 Jan 2020 07:19:07 +0100