current location:Home > Technical Articles > Backend Development
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- What is the method for SpringBoot to integrate message queue RabbitMQ?
- Introduction In the Spring project, you can use Spring-Rabbit to operate RabbitMQ. Especially in the springboot project, you only need to introduce the corresponding amqp starter dependency. It is convenient to use RabbitTemplate to send messages and use annotations to receive messages. Generally during the development process: producer project: application.yml file configures RabbitMQ related information; write configuration classes in the producer project to create switches and queues, bind and inject RabbitTemplate objects, and send messages to the switch through RabbitTemplate objects Consumer Engineering: application.
- javaTutorial . spring-boot 1296 2023-05-16 17:25:06
-
- How to integrate springboot and mybatis
- Integrate MyBatis to create a new SpringBoot project, or use Chapter 1 as the basis to introduce dependencies in pom. mysql-connector-java introduces and integrates the core dependency of MyBatis, mybatis-spring-boot-starter. The spring-boot-starter-jdbc dependency is not introduced here because mybatis-spring-boot-sta
- javaTutorial . spring-boot 764 2023-05-16 15:52:06
-
- How to use cache in SpringBoot project
- Preface Caching can effectively improve system performance and stability by storing frequently accessed data in memory, reducing the pressure on underlying data sources such as databases. I think everyone has used it more or less in their projects, and our project is no exception. However, when I was reviewing the company's code recently, the writing was very stupid and low. The rough writing is as follows: publicUsergetById(Stringid){Useruser=cache. getUser();if(user!=null){returnuser;}//Get user from the database=loadFromDB(id);cahce.put(id,user);returnu
- javaTutorial . spring-boot 966 2023-05-16 14:34:13
-
- How Springboot solves the cross-domain request problem of ajax custom headers
- 1. What is cross-domain? Because of the browser’s same origin policy (original origin policy), it is a well-known security policy proposed by Netscape. Now all browsers that support JavaScript will use this policy. The so-called same origin refers to domain name, protocol , the port is the same.), any one of the protocol, domain name, and port used to send the request URL is different from the current page address, it is considered cross-domain. For details, you can check the following table: 2. How springboot solves cross-domain problems 1. Common cross-domain request solutions: ①Add the annotation @CrossOrigin(origins="http://127.0.0.1:8020",maxAge=360 to the request interface
- javaTutorial . spring-boot 1148 2023-05-16 12:43:06
-
- SpringCloud-Spring Boot Starter usage test instance analysis
- What is SpringBootStarter? SpringBootStarter is a concept proposed in the SpringBoot component, which simplifies many cumbersome configurations. By introducing various SpringBootStarter packages, you can quickly build the scaffolding of a project. For example, some of the ones we often use: spring-boot-starter-web: spring-boot-starter-data-redis: spring-boot-starter-data-mongodb: spring-boot-starter-data-jpa: spring-b
- javaTutorial . spring-boot 1279 2023-05-16 11:10:07
-
- How to solve SpringBoot global exception problem
- SpringBoot is a product that was born to simplify a series of issues such as creating, running, debugging, and deploying Spring applications. The feature of automatic assembly allows us to better focus on the business itself rather than external XML configuration. We only need to follow the specifications and introduce The relevant dependencies can easily build a WEB project. In actual project development, various abnormal situations often occur in the program. Especially as server-side developers, we always keep writing interfaces to provide to the front-end. In the case of calls and division of labor, exceptions cannot be avoided. If the wrong information is directly exposed to the user, the experience can be imagined, and for hackers, detailed exception information often provides great help... Use try-c
- javaTutorial . spring-boot 1598 2023-05-16 10:49:12
-
- How Spring Boot integrates Thymeleaf
- Basic introduction to Thymeleaf SpringBoot officially recommends using Thymeleaf as its template engine. SpringBoot provides a series of default configurations for Thymeleaf and provides a view resolver for Thymeleaf. Once Thymeleaf's dependencies are imported into the project, the corresponding automatic configuration (ThymeleafAutoConfiguration) will automatically take effect, so Thymeleaf can be perfectly integrated with SpringBoot. Thymeleaf template engine can be perfectly combined with html tags to facilitate back-end rendering of data. Thymeleaf supports static effects and dynamic effects.
- javaTutorial . spring-boot 1349 2023-05-16 09:22:11
-
- How SpringBoot implements file upload and download functions
- SpringBoot file upload and download In actual web application development, in order to successfully upload files, the form method must be set to post and the enctype must be set to multipart/form-data. Only with this setting can the browser send the binary data of the selected file to the server. Starting from Servlet 3.0, methods for processing file uploads have been provided, but this file upload needs to be completed in JavaServlet, and SpringMVC provides a simpler encapsulation. SpringMVC implements a MultipartResolv through ApacheCommonsFileUpload technology
- javaTutorial . spring-boot 1486 2023-05-16 08:46:12
-
- What is the method for ssm to transform spring boot project?
- If it is a normal Maven project, you need to add dependencies manually. jarorg.springframework.bootspring-boot-starter-parent2.3.3.RELEASEorg.springframework.bootspring-boot-starter-weborg.springframework.bootspring-boot-starter-testtestorg.projectlomboklombokprovided Add startup class If it is a normal Maven project, you need to add it manually. @Spri
- javaTutorial . spring-boot 663 2023-05-16 08:28:05
-
- How to Analyze Code Auditing in Java Web Security
- 1. JavaWeb Security Basics 1. What is code auditing? In layman’s terms, Java code auditing is to discover security issues in the Java application itself by auditing Java code. Since Java itself is a compiled language, even if there are only class files We can still audit Java code. For uncompiled Java source code files, we can read the source code directly, but for compiled class or jar files, we need to decompile them. Java code auditing itself is not very difficult. As long as you are proficient in the auditing process and common vulnerability auditing techniques, you can complete the code auditing work relatively easily. But the way of Java code auditing is not just to use
- Safety . spring-boot 1823 2023-05-16 08:04:21
-
- How SpringBoot implements api encryption
- In the SpringBoot API encryption docking project, in order to ensure data security, we often encrypt the transmitted data. Commonly used encryption algorithms include symmetric encryption (AES) and asymmetric encryption (RSA). The blogger selected the simplest API encryption project on Code Cloud for the following explanation. Below is an introduction to our brightest project, the rsa-encrypt-body-spring-boot project. This project uses RSA encryption to encrypt the data returned by the API interface, making the API data more secure. Others cannot decipher the data provided. SpringBoot interface encryption can automatically encrypt and decrypt return values and parameter values through annotations. What is RSA encryption first me
- javaTutorial . spring-boot 899 2023-05-15 23:10:05
-
- How does SpringBoot select me first when loading beans?
- 1. Applicable scenarios If we need to manage the startup sequence of specific beans in all hierarchies of the application. For example, you need to initialize a bean when the application starts. If the beans in our public library are used by other developer services, but they need to customize beans in some scenarios, we need to load the beans in the public library before these customized beans. 2. Three implementation methods In SpringBoot applications, we can adopt the following three methods to achieve priority loading of our own beans: 1. @Configuration annotation + @DependsOn annotation @Configuration annotation in SpringBoo
- javaTutorial . spring-boot 1284 2023-05-15 21:13:04
-
- How to build springboot project in idea
- SpringBoot is a new framework provided by the Pivotal team. It is designed to simplify the initial construction and development process of new Spring applications. What it mainly advocates is 'eliminating configuration' and achieving zero configuration. So, how to create a springboot project in idea? 1. Create a Module under the project you created and select Springinitializr to create it. 2. Select MavenProject (the project's construction tool) at Type. 3. When creating dependencies, check web, mybatis, and mysql (this depends on your personal needs, you can choose independently). The established project structure is as follows:
- javaTutorial . spring-boot 5347 2023-05-15 20:28:10
-
- How to set springboot startup port
- Springboot is a good thing. It can be started directly in the main method without a container, and no configuration file is required, making it easy to quickly build an environment. But when we want to start two springboot projects at the same time, there will be a problem. The second application may not be started because port 8080 is occupied by the first application. In this case, we need to modify the startup port of one of the projects. This can be achieved by implementing the EmbeddedServletContainerCustomizer interface: publicclassApplicationextendsSpringBootServletInitializerimplements
- javaTutorial . spring-boot 2033 2023-05-15 16:13:06
-
- How to use Spring MVC in Spring Boot
- 1.MVCMVC is a common software design pattern used to separate different parts of an application to achieve loose coupling and high cohesion. The MVC pattern consists of three core components: Model: represents the data and business logic of the application. The model processes the application's data and performs corresponding operations based on the controller's instructions. View: Provides a user interface for model data. Views are usually templates, HTML pages, XML files, or other formats that can present model data to users. Controller: Handles user interaction and updates models and views. The controller is responsible for receiving user input from the view, performing corresponding operations on the model, and updating the view to reflect the changes. MVC pattern
- javaTutorial . spring-boot 1982 2023-05-15 14:04:06