current location:Home > Technical Articles > Backend Development

  • What is the process and principle of SpringBoot's defense against CSRF attacks?
    What is the process and principle of SpringBoot's defense against CSRF attacks?
    CSRF Principle If we want to defend against CSRF attacks, we need to first understand what a CSRF attack is. Let us sort out the CSRF attack process through the following illustration: In fact, this process is very simple: 1. Assume that the user opens the China Merchants Online Banking website and logs in. 2. After successful login, online banking will return the cookie to the front end, and the browser will save the cookie. 3. The user opened a new tab in the browser without logging out of online banking, and then visited a dangerous website. 4. There is a hyperlink on this dangerous website, and the address of the hyperlink points to China Merchants Online Banking. 4. The user clicks this link. Since this hyperlink will automatically carry the cookie saved in the browser,
    javaTutorial . spring-boot 861 2023-05-12 21:13:04
  • How to close actuator in SpringBoot
    How to close actuator in SpringBoot
    SpringBoot closes the actuator management:endpoint:health:show-details:ALWAYSendpoints:enabled-by-default:false#Close monitoring web:exposure:include:'*'SpringBootactuator knowledge sort out SpringBoot's Actuator. It provides many production-grade features, such as monitoring and measuring SpringBoot applications. These features of Actuator are available through numerous REST endpoints
    javaTutorial . spring-boot 10360 2023-05-12 19:46:10
  • How to solve the conflict between Springboot2.6.x higher version and Swagger2 version
    How to solve the conflict between Springboot2.6.x higher version and Swagger2 version
    Problem: After the SpringBoot2.6.x version introduces the dependency springfox-boot-starter (Swagger3.0), an error will be reported when starting the container: Failedtostartbean'documentationPluginsBootstrapper';nestedexception... The reason is that Springfox assumes that the path matching strategy of SpringMVC is ant-path-matcher, and The default matching strategy of SpringBoot2.6.x version is path-patte
    javaTutorial . spring-boot 2417 2023-05-12 18:04:06
  • How to solve the packaging error when Mybatisplus creates SpringBoot project
    How to solve the packaging error when Mybatisplus creates SpringBoot project
    Create a SpringBoot project a. Initialize project dependencies: dependencies b. Introduce dependencies and add dependencies in the dependencies of pom. When the project was first created, there was no version added, and there was a popular error, Plugin'org.springframework
    javaTutorial . spring-boot 1261 2023-05-12 14:28:27
  • What is the method for integrating Redis in java SpringBoot project?
    What is the method for integrating Redis in java SpringBoot project?
    Redis is completely open source, complies with the BSD protocol, and is a high-performance key-value database. Redis has the following three characteristics with other key-value cache products: Redis supports data persistence and can save data in memory on disk. , it can be loaded again for use when restarting. Redis not only supports simple key-value type data, but also provides storage of data structures such as list, set, zset, and hash. Redis supports data backup, that is, data backup in master-slave mode. The advantages of Redis are extremely high performance – Redis can read 110,000 times
    javaTutorial . spring-boot 1506 2023-05-12 13:52:13
  • 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 . spring-boot 2090 2023-05-12 11:49:05
  • How to get a handle on SpringBoot log files
    How to get a handle on SpringBoot log files
    SpringBoot log files 1. What are the uses of logs? Logs are an important part of the program. Imagine if the program reports an error and does not allow you to open the console to view the log, can you find the reason for the error? For us, the main purpose of logs is to troubleshoot and locate problems. In addition to discovering and locating problems, we can also achieve the following functions through logs: record user login logs to facilitate analysis of whether the user logged in normally or maliciously cracked the operation logs of the user recording system to facilitate data recovery and locate the execution of the operator recording program time to facilitate the optimization program to provide data support in the future. 2. How to use logs. The SpringBoot project will have log output by default when it is started, as shown below: Through the above information, we can
    javaTutorial . spring-boot 1277 2023-05-12 11:46:05
  • How Apache Camel and Springboot implement file transfer
    How Apache Camel and Springboot implement file transfer
    1. Create a SpringBoot project. Create a new project and select the dependent jar package: add camel and web dependencies. Figure-2 Project information confirmation 2. Add other dependencies 4.0.0org.springframework.bootspring-boot-starter-parent2.4.3com in the POM file .liweicamel-file0.0.1-SNAPSHOTcamel-fileDemoprojectforSpringBoot1.8org.springframework.bootspring-boot-starter-weborg.
    javaTutorial . spring-boot 1303 2023-05-12 10:01:13
  • 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 . spring-boot 1098 2023-05-11 23:37:04
  • How to load external configuration files after the SpringBoot project is made into a jar
    How to load external configuration files after the SpringBoot project is made into a jar
    1. Application.properties is external. Most of the configuration information is configured in application.properties, so can this file be external? Of course this is possible. First define a property in application.preperties: demo.name=hello.01 and use it in Controller: @Value("${demo.name}")privateStringdemoName;@RequestMapping("/test")publicSt
    javaTutorial . spring-boot 2016 2023-05-11 23:28:14
  • How to apply gradle Plugin in Springboot
    How to apply gradle Plugin in Springboot
    Detailed explanation of Springboot application gradlePlugin SpringBoot's Gradle plug-in provides SpringBoot's functional support for the Gradle build tool. It can be used to package projects into executable jars or wars, or to run SpringBoot applications, or to use the dependency management provided by spring-boot-dependencies. . You need to add the following configuration to the project to use the plug-in. New version //Plug-in configuration plugins{id'org.springframework.boot'version'2.4
    javaTutorial . spring-boot 1744 2023-05-11 20:25:14
  • How to solve the error 405 when Springboot uses put and delete requests
    How to solve the error 405 when Springboot uses put and delete requests
    Springboot uses put and delete requests to report errors. SpringBoot has automatically configured HiddenHttpMethodFilter for us, but recently it seems that it cannot be used. The SpringBoot version I am using is 2.2.2, and the default configuration has been changed to false, which means that automatic configuration is turned off. No You know what sprongboot is, it’s a trap! ! ! Therewasanunexpectederror(type=MethodNotAllowed,status=405).Requestmethod'POST'notsup
    javaTutorial . spring-boot 3079 2023-05-11 18:01:11
  • What are the common framework annotations for Spring Boot Rest?
    What are the common framework annotations for Spring Boot Rest?
    Prerequisites to get started with SpringBootRest The most important thing to know is the Spring container or IOC. In addition to this, you must have basic knowledge of Java annotations. Because SpringBoot applications are full of annotations. Last but not least, the concept of REST should be clarified, at least the basic concepts. For example, GET, POST, PUT, DELETE, Requestbody, response, headers, etc. Create a SpringBoot project in SpringInitializer The best thing about SpringBoot is that it has a web application for getting started. Just click on a few form fields and buttons to
    javaTutorial . spring-boot 1302 2023-05-11 17:22:06
  • How to use Spring Boot to monitor SQL running status
    How to use Spring Boot to monitor SQL running status
    1. Preparation work First, let's create a SpringBoot project and introduce MyBatis, etc., as follows: Select MyBatis and MySQL drivers and make a simple test case. First connect to the database: spring.datasource.username=rootspring.datasource.password=123spring.datasource.url=jdbc:mysql:///test05?serverTimezone=Asia/Shanghai Create a User entity class and make a simple query case , as follows: publicclas
    javaTutorial . spring-boot 1481 2023-05-11 17:13:06
  • SpringBoot startup process SpringApplication source code analysis
    SpringBoot startup process SpringApplication source code analysis
    SpringBoot startup process source code analysis 1. Entry parameter research and object creation preparation stage analysis Let’s first look at SpringApplication’s run() method packageorg.springframework.boot; publicConfigurableApplicationContextrun(String...args){//1. Timer StopWatchstopWatch=newStopWatch ();stopWatch.start();ConfigurableApplicationContextcontext
    javaTutorial . spring-boot 1512 2023-05-11 16:22:06

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