current location:Home > Technical Articles > Backend Development

  • How to implement verification code with SpringBoot+kaptcha
    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
    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
    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
    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?
    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
    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
    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
    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
    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
    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
    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
    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?
    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
    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
    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

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