SpringMVC–@RequestMapping annotation

@RequestMapping annotation The function of @RequestMapping annotation The location of the @RequestMapping annotation @RequestMapping annotated properties 1. value attribute 2. method attribute 3. params attribute (understand) Replenish @RequestParam @RequestHeader @RequestBody @RequestBody gets request parameters in json format @ResponseBody @RestController annotation Function of @RequestMapping annotation The function of the @RequestMapping annotation is to associate the request […]

[C#] Use of Mapster object mapping

Series of articles [C#] Number generator (define order number rules, fixed characters, serial numbers, business order numbers) Link to this article: https://blog.csdn.net/youcheng_ge/article/details/129129787 [C#] Date range generator (start date, end date) Link to this article: https://blog.csdn.net/youcheng_ge/article/details/129040663 [C#] Component development, calling dll component methods Link to this article: https://blog.csdn.net/youcheng_ge/article/details/129492112 [C#] Use of data entity classes Link to […]

Project practice: component scanning (5) – parse methods with GetMapping or PostMapping and finally encapsulate them into ControllerDefinition

1. ControllerDefinition package com.csdn.mymvc.core; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; //Suppose there is a uri:/fruit/index @Data @NoArgsConstructor @AllArgsConstructor public class ControllerDefinition { private String requestMapping; private Object controllerBean; private Map<String, Method> methodMappingMap = new HashMap<>(); } 2. ComponentScan package com.csdn.mymvc.core; import com.csdn.mymvc.annotation.*; import java.io.File; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import […]

Project practice: component scanning (4) – filtering bean instances with RequestMapping annotations

1. ControllerDefinition package com.csdn.mymvc.core; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; //Suppose there is a uri:/fruit/index @Data @NoArgsConstructor @AllArgsConstructor public class ControllerDefinition { private String requestMapping; private Object controllerBean; private Map<String, Method> methodMappingMap = new HashMap<>(); } 2. ComponentScan package com.csdn.mymvc.core; import com.csdn.mymvc.annotation.*; import java.io.File; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import […]

HDU 1686: Oulipo ← KMP algorithm (overlapping calculations)

[Source of the question]http://acm.hdu.edu.cn/showproblem.php?pid=1686http://poj.org/problem?id=3461 [Title description] The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair normal, d’abord, puis surgissait l’inhumain, l’affolant. son tapis, assailant […]

The SpringBoot project keeps jumping to the default Please sign in

1 Questions and screenshots Projects that are normally logged in suddenly keep jumping to the Please sign in page 2 When the code is started, the console below outputs a line Using generated security password: ec9fdd88-21cc-42b2-8fa1-62e1b810e7b5 At this point security is integrated into the project 3 Solution Just add annotations to the startup annotations so […]

03-Sping transaction implementation: XML-based implementation of declarative transactions

XML implementation of declarative transactions Development steps Step 1: Introduce AOP-related aspectj dependencies <!–aspectj dependency–> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>6.0.0-M2</version> </dependency> Step 2: Write the dao layer interface and its implementation class public interface AccountDao {<!– –> // Check the balance based on the account number Account selectByActno(String actno); //Update account information int update(Account act); } […]