Why is it not necessary to write version number < version > when writing dependencies < dependencies > in maven configuration of some spring projects
Why do you not need to write version number when writing dependency in maven configuration of some spring projects
I. The first situation:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> ...
Posted by sherri on Sun, 24 Nov 2019 14:24:27 -0800
MOOC - JSP - use Cookie to save product browsing record
Using Cookie to realize product browsing record https://www.imooc.com/video/4720
1. Display the details of the goods
<body>
<h1>Commodity details</h1>
<hr>
<center>
<table width="750" height="60" cellpadding="0" cellspacing="0" border="0">
<tr>
<! ...
Posted by mk_silence on Sun, 24 Nov 2019 12:45:28 -0800
Spring MVC response request processing
Article directory
I. Basic operation
How to respond to requests
1. ModelAndView mode
2. The server does not respond to the result to the client
Returns a string
4. Return to a page
Absolute path
Relative path
5. Prefix and suffix
Configure view resolver
Redirect (add a redirect)
HttpServletRequest and HttpServletResponse
...
Posted by diggysmalls on Sun, 24 Nov 2019 08:45:05 -0800
Get the real ip address of the client in the background
In JSP, the method to get the IP address of the client is: request.getRemoteAddr(), which is effective in most cases. However, after passing Apache, Squid, nginx and other reverse proxy software, the real IP address of the client cannot be obtained. After the proxy, because the middle layer is added between the client and the s ...
Posted by azylka on Wed, 20 Nov 2019 10:24:20 -0800
Java essay: using java to dynamically generate random verification code pictures
Although java's graphics processing has always been a weak point, it does not prevent us from making some small things, such as our most common captcha image.
Small knowledge points used:
A little awt knowledge is used, but it's very simple.
Basic image io output, which belongs to basic knowledge.
OutputStream,ImageIO,Random ...
Posted by Castle on Wed, 20 Nov 2019 08:43:47 -0800
Various postures of exception handling in Spring
1. Preface
The importance of unified exception handling for application is self-evident. Today, let's talk about how Spring can handle unified Rest exception handling. At the same time, we will simply compare their advantages and disadvantages.
2. @Controller Combine @ ExceptionHandler
Declare a method in the controller and mark it with the @ ...
Posted by birwin on Sun, 17 Nov 2019 18:51:14 -0800
Java Web Implementation of verification code -- super simple code
1. Front end display
HTML:
<h3>Verification Code:</h3>
<input type="text" name="validationCode" id="validationCode" placeholder="Please enter the verification code" lay-verify="required">
<img src="validate.jsp" id="validationCode_img" title="Invisibility?Change another one" onclick="loadimage();return false;" name="vali ...
Posted by mikefn on Wed, 13 Nov 2019 06:02:09 -0800
Spring MVC (advanced parameters, List type binding, use of @ RequestMapping annotation, qualification of request method, and method return value)
Advanced parameter binding
1. Parameter binding of array type
Complete parameter transfer based on bulk deletion
@RequestMapping("queryItem")
public String queryItem(QueryVo vo, Integer[] ids) {
System.out.println(vo);
//Output the array passed in
if (ids != null && ids.length > 0) {
for (Integer id : id ...
Posted by Jove on Tue, 12 Nov 2019 11:39:17 -0800
15. Spring MVC for json interaction
Spring MVC for json interaction
json data format is commonly used in interface calls and html pages. json format is simple and easy to parse.
Request json, output json. It is not convenient for the front page to convert the requested content into json.
Request key/value and output json. This method is commonly used.
Environmental preparation
...
Posted by jpraj on Tue, 12 Nov 2019 06:16:30 -0800
Getting Started with Spring Boot Security - Memory User Authentication
brief introduction
As one of the Spring family bucket components, Spring Security is a security component that addresses two main issues:
Authentication: Verify user name and password;
Authorization: The permissions for different URLs are different and can only be accessed if the authenticated user has the required permissions for a URL.
At ...
Posted by lanrat on Fri, 08 Nov 2019 23:44:02 -0800