Spring MVC: unified exception handling and file upload and download

exception handling SimpleMappingExceptionResolver HandlerExceptionResolver interface custom exception Use @ ExceptionHandler annotation File upload and download If it's a picture, please refer to another Spring boot spring boot single / multi image upload and echo 1.SimpleMappingExceptionResolver cl ...

Posted on Tue, 18 Feb 2020 04:17:23 -0800 by greenba

Learn python-day02-23--From Python Distributed Crawler Creating Search Engine Scrapy

Section 367, Python Distributed Crawler Build Search Engine Scrapy Lecture - elasticsearch (search engine) scrapy writes data to elasticsearch The elasticsearch operations mentioned earlier, such as adding, deleting, altering, and searching, all use the language commands of elasticsearch, just like sql ...

Posted on Mon, 17 Feb 2020 18:39:27 -0800 by robkir

Mysql internal connection, left connection, right connection query

The table creation statement is as follows To create a table: -- ---------------------------- -- Table structure for a_table -- ---------------------------- DROP TABLE IF EXISTS `a_table`; CREATE TABLE `a_table` ( `id` smallint(6) AUTO_INCREMENT, `name` varchar(10) Not NULL, `phone` varchar(11) ...

Posted on Sun, 16 Feb 2020 22:47:27 -0800 by formxshape

Detailed summary of foreach in MyBatis

A detailed explanation of foreach statement of MyBatis foreach is mainly used to build in conditions. It can iterate a set in SQL statements. Properties of foreach element It mainly includes item, index, collection, open, separator, close Alias of each element in the item collection when iterating i ...

Posted on Sun, 16 Feb 2020 01:56:11 -0800 by nicephotog

mysql query slow optimization method 1

resolvent: Index the associated fields. The specific analysis is as follows: Give an example: Form: training student form, class registration form Demand: find out which classes the students have reported The two tables have an associated field "CD" (Student ID). View sql: SELECT `t_px_stu`.`PX_STU_PK` AS `PX_STU_PK ...

Posted on Sat, 15 Feb 2020 10:42:37 -0800 by ss-mike

Using eclipse to write a java web program with simple login and registration function in the form of MVC 2

Please pay attention to the version before using. My tomcat is version 9.0, and the notes in it are less, which may be more laborious for novices. First, create a demo database and then a user table in Mysql. The code is as follows create database Demo default charset=utf8; use Demo; create table user ...

Posted on Sat, 15 Feb 2020 08:24:16 -0800 by Webbyturtle

Grabbing the final sql with the mybatis plug-in

Summary of pain points When we are de bug ging and need to see the complete sql, we can get the sql as shown in the figure in the console Then manually replace the question mark placeholders one by one and go to MySQL to see if there is any problem with sql. If the sql is simple, it's easier to say. If it's a complex sql, manually replace N qu ...

Posted on Sat, 15 Feb 2020 08:17:40 -0800 by nilansanjaya

Servlet&HTTP&Request of Java learning notes

1, The architecture of Servlet 1.Servlet: Interface 2.GenericServlet: abstract class The other methods in the Servlet interface are implemented by default, and only the servlet() method is abstracted. When defining Servlet classes in the future, you can inherit GenericServlet and implement servlet() m ...

Posted on Sat, 15 Feb 2020 01:15:07 -0800 by lawnninja

JDBC operation database 06

There is a problem in synthesizing the jdbc operations in the previous several articles, that is, too many repetitive steps need to be written, which wastes time, so you can write a jdbc tool class, encapsulate some repetitive code, and call directly when necessary Steps: 1. Write the JdbcUtil class as ...

Posted on Fri, 14 Feb 2020 07:11:48 -0800 by p2003morris

What's the worst problem in C or. NET? [closed]

I recently used the DateTime object and wrote something like this: DateTime dt = DateTime.Now; dt.AddDays(1); return dt; // still today's date! WTF? The intellisense document for AddDays() says it added a day to the date, but it doesn't - it actually returns the day it added, so you have to write it as: DateTime dt = DateTime.Now; dt = ...

Posted on Fri, 14 Feb 2020 01:57:32 -0800 by gcussi