current location:Home > Technical Articles > Backend Development

  • How to implement Redis multi-level cache based on Java
    How to implement Redis multi-level cache based on Java
    1. Multi-level caching 1. After the request of the traditional caching scheme reaches tomcat, it first goes to redis to get the cache. If there is no hit, it goes to mysql to get it. 2. The number of concurrent requests of multi-level caching scheme tomcat is much smaller than that of redis, so tomcat will Become a bottleneck and use each link of request processing to add cache respectively to reduce the pressure on tomcat and improve service performance. 2. The JVM local cache cache is stored in the memory. The data reading speed is faster, which can greatly reduce the access to the database and reduce the pressure on the database. Distributed cache, such as redis - Advantages: Large storage capacity, good reliability, can be shared in the cluster - Disadvantages: There is network overhead for accessing the cache - Scenario: Large amount of cached data, high reliability, needs to be in the cluster
    javaTutorial . tomcat 1038 2023-05-13 19:52:17
  • How to deploy tomcat and Nginx on linux server
    How to deploy tomcat and Nginx on linux server
    1. Preparation work: First of all, you must have a Linux server that can be played, and know the user name and password. Then you need to install two tools on the Windows computer that can connect to the Linux server, xshell5 and xftp5. I will not go into the installation tutorial. I will add a picture. Explain how to connect to the server: The xshell connection interface is as follows. After entering the host IP and click OK, xshell will pop up a window to enter the user name and password to connect successfully! The xftp connection interface is as follows. Just fill in the blanks. It’s very simple. I won’t go into details. I’d like to mention why sftp is chosen instead of ftp here. You’ll understand if you know how much you know about the difference between ftp and sftp! 2. Installation and deployment work If you want to deploy the project to
    Nginx . tomcat 982 2023-05-13 18:58:11
  • How to install and configure Docker nginx mounting
    How to install and configure Docker nginx mounting
    Download the nginx image in docker dockerpullnginxdockerimages Create the mounting directory mkdir-p/data/nginx/{conf, conf.d, html, logs} Write the nginx, conf configuration file and place it in the folder #formoreinformationonconfiguration, see: #*officialenglishdocumentation :http://nginx.org/en/docs/#*officialrussiandocumentation:http://ng
    Nginx . tomcat 1030 2023-05-13 17:16:13
  • What are SpringBoot static resource mapping rules?
    What are SpringBoot static resource mapping rules?
    1. Static resource mapping rules Double-click shift or ctrl+N in the project to search for the WebMvcAutoConfiguration.class file. The addResourceHandlers method in the file is as follows: publicvoidaddResourceHandlers(ResourceHandlerRegistryregistry){if(!this.resourceProperties.isAddMappings()){logger.debug(" Defaultresourcehandlingdisabled&q
    javaTutorial . tomcat 1232 2023-05-13 16:28:06
  • How to encapsulate the startup entry of SpringBoot application
    How to encapsulate the startup entry of SpringBoot application
    Springboot can be said to be an essential skill for Java programmers. Everyone knows that Springboot can eventually be packaged into a jar package through maven, and then directly use the java-jar command to run a web project (or other). This avoids the complicated operations of the original tomcat-based web project. Springboot can make the deployment of Web services so simple because it has a built-in Jetty (or Tomcat) server, and starts the server during the container startup process to successfully run the Web service. I believe that all Springbooters will be familiar with the following code, whether they are new students learning Springboot,
    javaTutorial . tomcat 1456 2023-05-13 10:28:21
  • How springboot handles compression requests
    How springboot handles compression requests
    Springboot's processing of compression requests has recently been aligned with UnionPay's requirements. In order to save bandwidth, messages need to be compressed. But using the compression settings that come with springboot does not work: server.compression.enabled=trueserver.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml, text/plainserver.compression.comp
    javaTutorial . tomcat 1435 2023-05-12 16:31:06
  • How to configure Nginx SSL certificate to achieve HTTPS access
    How to configure Nginx SSL certificate to achieve HTTPS access
    Background Due to project requirements and security reasons, it is necessary to change the previous http interface access to https access, so an SSL certificate needs to be configured. The architecture of the project is like this: the basic architecture is hard load (readwhere) + soft load (nginx) + tomcat cluster. The question now is where to configure the SSL certificate, directly on the hard load? Or configure it on nginx and tomcat respectively? Or is there any other configuration method? First, I gave up configuring the hard load, and then after searching for information on the Internet, I found that the certificate can be configured only on nginx, which means that nginx uses https for access, and nginx and tomcat use http for connection, so that the game
    Nginx . tomcat 1330 2023-05-12 15:07:12
  • How to implement SpringBoot automatic configuration
    How to implement SpringBoot automatic configuration
    How to implement springboot In the previous helloworld example, I have initially experienced the ease of springboot automatically importing dependencies and completing configuration. So, how is springboot implemented? 1. Dependency Management Features First look at the pom.xml in the previous content example: org.springframework.bootspring-boot-starter-parent2.3.4.RELEASEorg.springframework.bootspring-boot-starter-web adds a parent project here. , and only one dependency sprin is imported.
    javaTutorial . tomcat 1209 2023-05-12 14:31:12
  • How to deploy Java web system with Docker
    How to deploy Java web system with Docker
    Docker deploys javaweb system 1. Create a path test/appmkdirtest&&cdtest&&mkdirapp&&cdapp in the root directory 2. Copy apache-tomcat-7.0.29.tar.gz and jdk-7u25-linux-x64.tar.gz to the app directory 3. Unzip the two Solution to a tar.gz file tar-zxvfapache-tomcat-7.0.29.tar.gztar-zxvfjdk-7u25-linux-x64.tar.gz4.
    javaTutorial . tomcat 934 2023-05-12 14:31:06
  • How to use supervisor to manage nginx and tomcat containers
    How to use supervisor to manage nginx and tomcat containers
    Requirements: Use docker to start nginx+tomcat dual processes. In actual applications, multiple processes are relatively common. 1: Create dockerfile directory mkdir-p/docker/web2: Write dockerfile:/docker/web/dockerfilefromcentos7maintainerlintest@163.comcopycentos-base.repo/etc/yum.repos.d/centos-base.repocopynginx_install.sh/tmp/nginx_install .shru
    Nginx . tomcat 1579 2023-05-12 14:10:06
  • How does Springboot use built-in tomcat to ban unsafe HTTP
    How does Springboot use built-in tomcat to ban unsafe HTTP
    Springboot's built-in tomcat prohibits unsafe HTTP methods 1. In tomcat's web.xml, you can configure the following content to make tomcat prohibit unsafe HTTP methods/*PUTDELETEHEADOPTIONSTRACEBASIC2. Springboot uses the built-in tomcat without a web.xml configuration file, which can be configured through the following, To put it simply, it is to be injected into the Spring container @ConfigurationpublicclassTomcatConfig{@BeanpublicEmbeddedServletContainerFacto
    javaTutorial . tomcat 2070 2023-05-12 11:49:05
  • Analysis of unsafe decompression GetShell instances discovered through traceability
    Analysis of unsafe decompression GetShell instances discovered through traceability
    Recently, when we helped a client trace an intrusion incident, we discovered that the hacker used the website's "ZIP decompression function" to upload a Webshell before gaining access to the server. Because this leakage exploitation method is relatively representative in terms of "attack payload structure" and "actual decompression path", and the industry still does not pay enough attention to the "unsafe decompression" vulnerability. Therefore, we wrote this report, in which we explain the process of intrusion tracing and vulnerability discovery, and put forward some security suggestions from the two dimensions of security development and security dog ​​product protection solutions, hoping to benefit the industry. It is worth noting that although the CMS has made relevant defense configurations, if you directly write the JSP file in the root directory of the CMS, it will not be executed and a 403 error will be reported.
    Safety . tomcat 1010 2023-05-12 11:19:11
  • How to build a picture server with Nginx
    How to build a picture server with Nginx
    Rendering: Requirements: Implement image upload and batch upload technologies: nginx, vsftpd, spring, springmvc, kindeditor, centos Description: The content of this chapter is mainly to implement the image upload function. Kindediter is used to better demonstrate image uploading, echoing, and batch effects. The background code is not directly related to kindediter, so feel free to read it. In addition, there is a mybatis jar in the source code, so don’t pay attention to it. The content of this chapter is not used. It is to prepare for the subsequent content! Source code: See the bottom of the article Scenario: The user uploads the image to the tomcat server, and then the tomcat server uploads it to the nginx server through ftp
    Nginx . tomcat 1994 2023-05-12 10:19:05
  • What is the method for java server container tuning?
    What is the method for java server container tuning?
    1. Why should we perform project performance tuning? Before the project is released, the project needs to be stress tested to detect performance problems of the project. For example, the project response time is slow and the number of requests that the project can solve each time is small. Project bottlenecks, slow project data query times and other problems need to be tuned after they are detected. This means that if the response time of your project interface exceeds ten seconds and a series of measures have not been taken, then the project is defective. The problem is, the purpose of performance tuning is to make the project more optimized, RT (running response time) is smaller, TPS (throughput - "requests received from the database per second) is larger, etc. Generally, JMeter or K8s is used in enterprises, and some enterprises will build their own stress testing platform.
    javaTutorial . tomcat 1077 2023-05-11 23:37:04
  • How to use Nginx to forward port 80 to port 8080 on Mac
    How to use Nginx to forward port 80 to port 8080 on Mac
    Environment macos version: 10.12.6nginx version: 1.12.1 Installation The author uses homebrew to install the library brewsearchnginxbrewinstallnginx. After installing it like this, you will find that the listening port of nginx is 8080, not 80, so at this time you need to change the listening port of nginx, then this One step is very critical and cannot be changed in the traditional way. Readers please read this part carefully. Since macos comes with its own apache service, it occupies port 80. First, you need to change the listening port of apache to another one or uninstall it directly. The author changed its listening port to 8011. Command Line
    Nginx . tomcat 1656 2023-05-11 21:49:16

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28