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:
-
- How to implement verification code with SpringBoot+kaptcha
- 1. Basic usage kaptcha is a very old verification code generation tool. How old is it? Dating back to 2006. After so many years, not only is it not lonely but it is still being used by many people, which is enough to show its vitality and is worthy of our study. For convenience, we create a SpringBoot project to demonstrate its usage. First create a new SpringBoot project, and then add kaptcha dependencies, as follows: com.github.pengglekaptcha2.3.2 Next, we only need to provide a Bean to configure Kaptcha, as follows: @ConfigurationpublicclassKaptch
- javaTutorial . spring-boot 1680 2023-05-25 14:25:22
-
- Example analysis of Spring Boot Actuator's unauthorized access to getshell
- The boss of the preface department dug up this vulnerability in a certain src. It was an old hole. I thought it was interesting, so I set up a local environment to test it. Actuator is a functional module provided by springboot for introspection and monitoring of application systems. With the help of Actuator, developers can easily view and collect statistics on certain monitoring indicators of the application system. When Actuator is enabled, if relevant permissions are not controlled, illegal users can obtain monitoring information in the application system by accessing the default actuator endpoints, leading to information leakage or even server takeover. As shown above, the actuator is springb
- Safety . spring-boot 2235 2023-05-23 08:56:32
-
- How to solve the problem that there is no main manifest attribute in SpringBoot
- Solve the problem that SpringBoot does not have the main manifest attribute: after SpringBoot is packaged into a jar, the running prompt does not have the main manifest attribute. Solution: complete the bulid information in maven org.springframework.bootspring-boot-maven-plugin${spring.version}repackage. Reason: because I Use spring-boot-dependencies BOM instead of spring-boot-starter-parent parentPOM (see 13.2.2.UsingSpringBootwitho for details)
- javaTutorial . spring-boot 4183 2023-05-22 19:43:04
-
- SpringBoot dependency management source code analysis
- 1. Dependency management Ⅰ. Why don’t you need to specify the version when importing some dependencies? The dependencies we added when we created the project did not help us specify the version number. So how does SpringBoot specify the version account? Now let's peel off the work of SpringBoot's parent dependency starter spring-boot-parentorg.springframework.boot2.2.9.RELEASE1.1. The mouse pointer stays on spring-boot-parent and Ctrl+click with the left mouse button. Let's take a look at what this parent dependency starter is responsible for: org.springframew
- javaTutorial . spring-boot 1190 2023-05-22 13:49:14
-
- What is the SpringBoot startup process?
- Introduction to the SpringBoot startup process The startup process of a SpringBoot application can be divided into the following steps: Load the application context Scan all components in the application Automatically configure the application environment Start the embedded web server Load the application context The context of the SpringBoot application is a A container that contains all application components. During the startup process, SpringBoot will load and initialize this container. The source code for this step is in the SpringApplication class. Specifically, the run method of the SpringApplication class is the entry point of this process. In this method, SpringBoot will call
- javaTutorial . spring-boot 8258 2023-05-21 23:14:54
-
- How to configure serialization in springboot in Dongba District
- Use SpringBoot default configuration SpringBoot uses UTC time by default. If we need to use East Eight Zone time, we can use the following configuration: spring:jackson:time-zone:GMT+8 This method is the simplest method and does not require any additional dependencies. and code, but it should be noted that this configuration is globally effective and may affect other places that need to use UTC time. Moreover, every time you add a new dependency, upgrade the SpringBoot version, etc., you need to check again whether the configuration is correct. Another way to customize the configuration class is to customize the configuration class. Use the @Configuration annotation to create a configuration class and then configure it in the class.
- javaTutorial . spring-boot 1365 2023-05-21 20:55:26
-
- How to set the springboot startup port on the cloud server
- Cloud server: springboot is a good thing. It can be started directly in the main method without a container, and no configuration file is required, which is convenient for quickly setting up 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: publicclassApplicationextendsSpringBootServletInitializerimple
- javaTutorial . spring-boot 1528 2023-05-21 19:53:06
-
- How to integrate and use Springboot's nocos
- Preface Nacos is committed to helping you discover, configure and manage microservices. Nacos provides a simple and easy-to-use feature set to help you quickly implement dynamic service discovery, service configuration, service metadata and traffic management. Nacos helps you build, deliver and manage microservices platforms more agilely and easily. Nacos is a service infrastructure for building modern application architecture centered on "service" (such as microservice paradigm, cloud native paradigm). To create a project, first create a maven project. The parent project pom is as follows: 4.0.0org.exampleconfigDemo1.0-SNAPSHOTorg .springframework.bootspring-boot-st
- javaTutorial . spring-boot 1366 2023-05-21 15:32:09
-
- How to enable Actuator endpoint monitoring in SpringBoot2
- Background SpringBoot itself provides a set of monitoring endpoints, which can view the basic information, health, configuration and other monitoring information of the application, making it easy to get started. Note: The SpringBoot version used here: 2.1.4 Turn on Actuator and add spring-boot-starter-actuator dependency in Maven's pom.xml file: org.springframework.bootspring-boot-starter-actuator to run the project directly and control it on the backend The station will see the following output: 2019-06-2618:07:27.896INFO7868---[r
- javaTutorial . spring-boot 1464 2023-05-21 08:13:05
-
- How SpringBoot uses @Cacheable for caching and value retrieval
- Using @Cacheable for caching and value 1. The role of @Cacheable Cache usage steps: The @Cacheable annotation is used to use cache. So we can first talk about the steps to use the cache: enable annotation-based caching and use the @EnableCaching flag on the main startup class of SpringBoot. The first step is to mark the cache annotation: enable annotation-based caching, use @EnableCaching annotation on the springboot main startup class //enable annotation-based caching @EnableCaching @EnableRyFeignClients@SpringBootAppli
- javaTutorial . spring-boot 2058 2023-05-20 13:30:17
-
- How to implement elegant parameter verification in Java
- 1. The introduction needs to verify the parameters of the method. The simplest and most violent way of writing is like this: publicstaticvoidutilA(Stringa,BigDecimalb){if(StringUtils.isEmpty(a)){System.out.println("a cannot be empty" );return;}if(b==null){System.out.println("b cannot be null");return;}if(b.compareTo(BigDecimal.ZERO)!=1){System.out
- javaTutorial . spring-boot 2624 2023-05-19 19:43:04
-
- How SpringBoot integrates the JPA framework
- 1. Overview of SpringBoot data access SpringData is an open source framework provided by Spring to simplify database access and support cloud services. It is an umbrella project that includes a large number of data access solutions for relational and non-relational databases. It is designed to allow us to quickly and easily use various data access technologies. By default, SpringBoot adopts the method of integrating SpringData to unify the data access layer. By adding a large number of automatic configurations, introducing various data access templates xxxTemplate and a unified Repository interface, it simplifies the operation of the data access layer. SpringData provides multiple types of data
- javaTutorial . spring-boot 2002 2023-05-19 09:52:50
-
- What is the SpringBoot transaction processing mechanism?
- 1. Spring's transaction mechanism All data access technologies have transaction processing mechanisms. These technologies provide APIs to start transactions, submit transactions to complete data operations, or roll back data when an error occurs. Spring's transaction mechanism uses a unified mechanism to handle transaction processing of different data access technologies. Spring's transaction mechanism provides a PlatformTransactionManager interface. Transactions with different data access technologies use different interface implementations: The code to define the transaction manager in the program is as follows: @BeanpublicPlatformTransactionManagertransactionManager
- javaTutorial . spring-boot 1336 2023-05-18 23:04:04
-
- How to use banner in SpringBoot
- The first step to make your own banner: create banner.txt under src/main/resources. Step 2: Visit the website http://patorjk.com/software/taag, enter the word you want to create (for example: HelloWorld) in the "TypeSomething" section of the website, and the corresponding characters will be generated. You can also adjust the character style through other parameters. Copy the generated characters, paste them into banner.txt, and start the program again to print out the specified banner. The banner I personally like is the following graphic: ${AnsiColor.BRIGHT_YELLOW
- javaTutorial . spring-boot 1236 2023-05-18 18:04:06
-
- How to configure SSL in SpringBoot to support http and https access at the same time
- Transport Layer Security (English: Transport Layer Security, abbreviated as TLS), and its predecessor Secure Sockets Layer (Abbreviated as SSL) are a security protocol designed to provide security and data integrity protection for Internet communications. SSL includes a record layer (RecordLayer) and a transport layer. The record layer protocol determines the encapsulation format of the transport layer data. The transport layer security protocol uses X.509 authentication, and then uses asymmetric encryption algorithms to authenticate the communicating parties, and then exchanges symmetric keys as session keys. This conversation key is used to encrypt the data exchanged between the two communicating parties to ensure that the communication between the two applications
- javaTutorial . spring-boot 1142 2023-05-18 14:25:06