Spring Security OAuth2 authentication server custom exception handling

The default data format returned by the authentication server is as follows: { "error": "unsupported_grant_type", "error_description": "Unsupported grant type: password1" } The above return result is very unfriendly, and the front-end code is also difficult to determine what the error is, so we ...

Posted by gypmaster on Tue, 22 Oct 2019 21:43:38 +0200

The realization of vernacular series simple mvc web API framework

This article is a very simple mvc api framework, which is only used as the parsing method of the entry api, and this is not mvc framework, because there is no view layer, after all, most of them are front-end and back-end separation, of course, the view layer can also be provided, because only view is returned as text. GitHub address: https:// ...

Posted by tvance929 on Tue, 22 Oct 2019 13:46:16 +0200

Four references in Java

We mentioned GC before, but when more and more objects are referenced in Java, there will be insufficient memory space, resulting in the error OutOfMemoryError and application termination. So why can't GC collect more objects at this time? This is related to the reference types mentioned today.<!-- more --> First of all, starting from JDK ...

Posted by betman_kizo on Tue, 22 Oct 2019 06:42:12 +0200

Java serialization 43 - other considerations for accessing static methods, static keywords

I. other precautions 1. For methods with static, we said that we need to use the method of "class name", but in fact, we can use the method of "reference" to access this method.   package com.bjpowernode.java_learning; ​ public class D43_ { public static void main(String[] args) { Test3.test3(); ...

Posted by hrichman on Sun, 20 Oct 2019 20:16:43 +0200

paddlepaddle Baidu flying experience two - Chinese text classification

1 related links ERNIE Code: https://github.com/PaddlePaddle/ERNIE/tree/develop/ERNIE 2 specific use 2.1 use steps Download data: Download the model (including configuration files and dictionaries) and task data. Decompress the model and task data, start the training, execute bash script / run ABC ...

Posted by Jtech inc. on Sun, 20 Oct 2019 19:59:01 +0200

nacos as the configuration center of the project

This project is built by using spring cloud. You need to pay attention to the version when integrating with nacos. Otherwise, you may refresh the configuration when you restart the project, and it cannot be hot updated. The following is the version map: First of all, Download Nacos server, and don't attach the project address of github her ...

Posted by nickdd on Sun, 20 Oct 2019 07:00:45 +0200

Deployment of k8s components on the second master

Then in the first part, before deploying Kubernetes, make sure that etcd, flannel and docker work normally, otherwise, solve the problem first and then continue. Three main roles are deployed: Kube apiserver Kube Controller Manager Kube scheduler 1. Generate Certificate (on the master) 1 establish a directory to store certificates cat > ca- ...

Posted by Nexy on Fri, 18 Oct 2019 21:17:38 +0200

Java serialization 42 this can not be omitted, construction method setting default value method

I. When can't this be omitted? Let's give an example to illustrate class User2{ private int id; public int getId() { return id; } public void setId(int id) { this.id = id;//If it's written here id=id,Then according to the principle of proximity, the first id It's the formal parameter. The second one. id Als ...

Posted by juliston on Fri, 18 Oct 2019 20:29:47 +0200

Binary installation Prometheus

Server list: Server name operating system IP address service test03 Ubuntu 16.04.4 192.168.1.58 Prometheus, Alertmanager,grafana test02 Ubuntu 16.04.4 192.168.1.57 Node_exporter 1. Install prometheus Download address on Prometheus official website: https://prometheus.io/download/ Download prometheus root@test03:~# wget https://g ...

Posted by DeadDude on Thu, 17 Oct 2019 22:15:56 +0200

An example in Go demonstrates the convenient processing and transformation of json's map and struct

Today, I'd like to talk a little bit about JSON data processing. In recent work, because we want to update the database data to elastic search in real time, we encounter some problems of JSON data processing in practice. real-time data The real-time data acquisition is realized by the open-source canal component of Alibaba, and transmitted to t ...

Posted by simjay on Wed, 16 Oct 2019 23:41:56 +0200