Jerry's Blog

Recording what I learned everyday

View on GitHub


10 May 2019

OTP message----send SMS message with Java

by Jerry Zhang

#Tip of the Day:



OTP Mapping

Redis is perfect in this key value scenario. For now, we use a httpsession temporarily.

httpServletRequest in Spring

httpServletRequest is managed by Spring container as a threadlocal mode, which means each request is owned by the current user.

JQuery tips:

All the rendering must happen after the page is loaded.

RequestMapping Consumes and produces

In Http request header, ContentType tells the server what type of data it is sending. Accept tells the server “as a client, I accept what type of data.”

In Spring server, consumes maps ContentType and produces maps Accept.

CORS

@CrossOrigin
public class UserController{}
tags: Java, - validation