Spring MVC + POI export web data to Excel

Spring MVC + POI export web data to Excel Apache POI is an open source library of the Apache Software Foundation. POI provides the functions of reading and writing Microsoft Office files to Java programs. Next, I will release an example of Excel export based on spring MVC + Maven + poi. Welcome to criticize and correc ...

Added by Optimo on Sat, 23 May 2020 17:49:36 +0300

Detailed explanation of Spring IoC createBean method

preface This article mainly analyzes the flow of the createBean() method of Spring IoC and the bean life cycle. Here is a general flow chart: text AbstractAutowireCapableBeanFactory#createBean @Override protected Object createBean(String beanName, RootBeanDefinition mbd, @Nullable Object[] args) throws BeanCreationException { if ( ...

Added by skippence on Fri, 22 May 2020 13:27:50 +0300

Consul configuration center of Spring Cloud series

We have learned about Spring Cloud Config before: Consul configuration center of Spring Cloud series (I) Consul configuration center of Spring Cloud series (2) Consul configuration center of Spring Cloud series (3) It provides the function of configuration center, but it needs to cooperate with git, svn or external storage (such as various da ...

Added by synergypoint on Mon, 18 May 2020 09:51:39 +0300

Leader 1-to-1 micro service system Solar | Alibaba Sentinel landing practice

preface In recent years, the business of leader 1-to-1 has been developing rapidly, but at the same time, he has encountered "growing pains". With the increasing number of microservices, the traffic further increases, and the hardware resources are a little overwhelmed. Then, how to achieve better flow protection measures such as curr ...

Added by webtailor on Mon, 18 May 2020 09:32:34 +0300

Another way to write Spring MVC interface

1. Preface In general, the paradigm for writing Spring MVC interface is as follows: @RestController @RequestMapping("/v1/userinfo") public class UserInfoController { @GetMapping("/foo") public String foo() { return "felord.cn"; } } Today, I'm going to use the new Functional Endpoints introduced by Spring 5 to play. Sp ...

Added by mynameisbob on Fri, 15 May 2020 07:48:02 +0300

How to use Java 8 functional programming more elegantly?

Stream and Optional in Java 8 bring us the fun of functional programming, but Java still lacks many key features of functional programming. Lambda Expressions Optional and Stream It's just the tip of the iceberg for functional programming. This also led to the emergence of varvr and functionlajava class libraries, both of which originated from ...

Added by examiz on Thu, 14 May 2020 08:49:26 +0300

The SpringBoot Getting Started series implements uniform exception handling, which is as simple as that!

Next, we will focus on how to use uniform exception handling in SpringBoot applications.How do I reuse exception data with normal business data and return it as a json?   Why uniform exception handling Currently, our project architecture is basically a separate front-end and back-end model: developed using Restful interface protocol, the fo ...

Added by DeGauss on Wed, 13 May 2020 20:00:56 +0300

Applicant Ali, byte beating, Spring IOC and factory mode that Meituan must master

Spring IOC and Factory Mode PS: The content of this article is hard core, which requires a better understanding of java's object-oriented, reflection, class loader, generics, properties, XML and other basic knowledge. (1) Brief introduction Before talking about Spring IOC, it's necessary to talk about Factory Pattern.Factory mode separates the ...

Added by edkellett on Fri, 08 May 2020 20:56:05 +0300

The loading of resources in Spring is the same thing!

1. Introduction In JDK, java.net.URL is applicable to the classes that load resources, but the implementation classes of URL access network resources, and there is no way to obtain files and ServletContext from class path or relative path, Although the new handler can be implemented by customizing the extended URL interface, it is very complex. ...

Added by isam4m on Thu, 07 May 2020 16:15:51 +0300

Spring Security automatically kicks off the previous logged-in user, a configuration is complete!

After successful login, automatically kick off the previous login user. Songge first saw this feature inside the button. It was fun at that time. Once you've done your own development, you've met the same requirements. Just as the recent Spring Security series is being serialized, you can use Spring Security to talk about how this function work ...

Added by bl00dshooter on Thu, 07 May 2020 04:01:23 +0300