Build file server in 3 minutes

----------Building file server based on Tomcat Purpose: quickly build your own file server to separate files from projects Principle: tomcat maps the virtual directory as a file server, and uses the Jersey client to upload files across servers Jersey client code: //Jersey client private Client client = Client.create(); /** ...

Posted on Mon, 02 Dec 2019 06:56:11 -0500 by poscribes

Summary of Handlebars, a front-end template engine

I. escape of Handlebars template 1. template Escape, output HTML string when {}} is used When {{}}} is used, html is output without escaping (identifying HTML tag attributes) 2.Helpers medium When return '< span style ='color: Red' > safety string < / span > ', escape and output HTML string When return new handlebars.sa ...

Posted on Mon, 02 Dec 2019 05:30:37 -0500 by George Botley

Solve Jackson 2 deserialization LocalDateTime error

Today, when integrating redis and spring boot, I encountered an error. Record it. The error is reported as follows: Could not read JSON: Cannot construct instance of `java.time.LocalDateTime` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator) After viewing, it is found ...

Posted on Mon, 02 Dec 2019 01:51:32 -0500 by daneth1712

Spring integrates RabbitMQ-03-SimpleMessageListenerContainer

SimpleMessageListenerContainer Simple message listening container. This class is very powerful. We can set many settings for it. For message configuration items, this class can satisfy all requirements; Listen to the queue (multiple pairs), start automatically, and declare automatically Set transaction properties, transaction manager and trans ...

Posted on Mon, 02 Dec 2019 01:39:27 -0500 by abie

Using toast component of Vant Weapp applet

problem When using the Mpvue framework and the Vant Weapp component library to develop wechat applets, when using toast components, we accidentally fall into a "pit", of course, the main problem is the path. Attention points When using toast components, there are several points to be noted compared with other most common Vant Weapp c ...

Posted on Sun, 01 Dec 2019 23:56:01 -0500 by ziv

laravel/passport implements API authentication (laravel 5.6)

Part 1: install Passport(laravel/passport) Step 1. Use Composer to install Passport:composer require laravel/passport=~7.0 Step 2. The Passport service provider uses the framework to register its own database migration directory, so after registering the provider,You should run the Passport migration command to automatically create a data ta ...

Posted on Sun, 01 Dec 2019 17:09:21 -0500 by MeOnTheW3

spring cloud gateway source code resolution dynamic routing

First, let's see how gateway gets the route we configured:When gateway starts, GatewayAutoConfiguration helps us register a series of beans @Bean @Primary public RouteDefinitionLocator routeDefinitionLocator(List<RouteDefinitionLocator> routeDefinitionLocators) { //All routedefinitionlocators are injected here. The rou ...

Posted on Sun, 01 Dec 2019 16:22:23 -0500 by prismngp

HTML form data to JSON

Problem description The back end receives the front-end incoming parameters as follows: 1 @PostMapping(value = "/test", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 2@ResponseBody 3 public Map<String, Object> test(@RequestBody Map<String, Object> map) { 4 System.out.println(map); 5 return map; 6 } Because of ...

Posted on Sun, 01 Dec 2019 15:14:27 -0500 by terje-s

Spring boot time parameter processing complete solution

In the development process of Java Web program, interface is the main window of front and back docking, and the receiving of interface parameters is sometimes a headache, among which the most perplexing one is the receiving of time parameters. For example: to set the expiration time of a user, in what format does the front end pass parameters? ...

Posted on Sun, 01 Dec 2019 14:55:58 -0500 by crazyjust

Bulk file upload breakpoint continue file second

Follow up the previous article java large file fragment upload On the basis of it, continue to realize the function of breakpoint continuous transmission and file second transmission In the previous article, we can use the file. slice method to slice files. We can read the size of the current file that has been uploaded from the background, an ...

Posted on Sun, 01 Dec 2019 14:53:24 -0500 by masalastican