Tag:spring-mvc

  • Spring security: how to protect user password

    Time:2020-4-1

    1. Preface In the previous article (https://www.felord.cn), we discussed the important user information subjects in spring securityUserDetailsIt is discussed. In the middle example, we use clear text password, and the rule is to add clear text to the password{noop}Prefix. Then this section will discuss the password encoding in spring security. 2. MD5 is not recommended […]

  • Global exception handling in the web part of spring boot series

    Time:2020-3-30

    When there are exceptions in our back-end applications, we usually wrap the exceptions and return them to the caller or the front-end. In the actual project, it is impossible to handle exceptions in every place, and even elegant code may throw exceptions. How can we handle these exceptions gracefully in the spring project? This paper […]

  • Spring extension point: beanfactorypostprocessor and its sub interface

    Time:2020-3-25

    BeanFactoryPostProcessor BeanFactoryPostProcessorIt is a functional interface with only one method: @FunctionalInterface public interface BeanFactoryPostProcessor { void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException; } Take a look at the description on the doc document: Allows for custom modification of an application context’s bean definitions, adapting the bean property values of the context’s underlying bean factory. Application contexts can […]

  • Custom exception handling HandlerExceptionResolver in web part of SpringBoot series

    Time:2020-3-19

    About the global exception handling of web applications, the previous article [email protected] realize the global exception management of web applications; This blog post brings another uncommon way of using it, through the implementation of customHandlerExceptionResolver, to handle exception status Link to the previous blog: Global exception handling in the spring boot tutorial webOriginal text: handlerexceptionresolver […]

  • Spring 5 source parsing 8-refresh method summary

    Time:2020-2-21

    Without much nonsense, just go to the source code annotation: //Abstractapplicationcontextාrefresh source code public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShutdownMonitor) { // Prepare this context for refreshing. //Prepare context, set its start date and activity flag, and perform initialization of property source prepareRefresh(); // Tell the subclass to refresh the internal bean factory. […]

  • Spring MVC source reading

    Time:2020-2-20

    Automatic loading of MVC @Configuration @ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnClass({ Servlet.class, DispatcherServlet.class, WebMvcConfigurer.class }) //Webmvcconfigurationsupport this bean does not exist to start this class. If the @ enablewebmvc annotation is automatically assembled, the two are mutually exclusive @ConditionalOnMissingBean(WebMvcConfigurationSupport.class) // priority @AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE + 10) //These autoconfigures are loaded after loading @AutoConfigureAfter({ DispatcherServletAutoConfiguration.class, TaskExecutionAutoConfiguration.class, ValidationAutoConfiguration.class }) public class […]

  • A guide to the use of filter in spring boot Web

    Time:2020-2-12

    Filter, one of the three major components of the web, is the first knowledge point that many small partners contact when learning java web. However, learning early does not mean using much. Basically, if you don’t write a web application from 0 to 1 (or even write a web application from 0 to 1), you […]

  • Spring boot series of tutorials: filter in the web chapter

    Time:2020-2-11

    In the previous blog post, we introduced two ways to use filter in spring boot. Here we introduce another way to directly use filter as a spring bean. In this way, the priority of filter can be directly passed [email protected] to specify; finally, from the source point of view, we will analyze the two different […]

  • Construction practice of wechat service task scheduling platform of Yixin

    Time:2020-2-7

    Content source: the 4th Technology Salon of Yixin Technology College – online live broadcast | construction practice of Yixin microservice task scheduling platform Speaker: Liang Xin, senior architect of Yixin & head of development platform Guide: Nowadays, both Internet applications and enterprise applications are full of batch processing tasks, which often need some task scheduling […]

  • Experience sharing: how can programmers quickly locate problems (bugs)

    Time:2020-2-1

    It’s not just memory leaks that make me cry It’s not just your needs that keep me up all night How long are you going to change tomorrow? Hold my hand What’s bothering me is the need for change Release always rolls back in the middle of the night Bug leaks haunt me at any […]

  • Spring cloud (Part 002) simple movie micro service (consumer, provider is user micro service)

    Time:2020-1-26

    Spring cloud (Part 002) simple movie micro service (consumer, provider is user micro service) – 1、 General introduction The communication between microservices and microservices is through HTTP protocol; The user micro service is the provider, the film micro service is the consumer, and the film micro service consumes the user micro service; 2、 Implementation steps […]

  • Spring cloud (Part 003) service discovery server eurekaserver microservice

    Time:2020-1-25

    Spring cloud (Part 003) service discovery server eurekaserver microservice – 1、 General introduction 1. As we all know, in the current Internet development, the IP and port number of the access address are dynamic. After a service is stopped and re enabled, the IP and port may change, so hard coding is definitely not enough. […]