当前位置:网站首页>Summary of database 2
Summary of database 2
2022-07-04 15:48:00 【rushduckxzr】
1.JDBC
Use of transmitter PreparedStatement Preprocessing statement , Can prevent sql Inject , Its preprogrammed performance is high . Security , Efficient ,sql concise
Statement: The parent interface ,sql Manual splicing parameters are required .
2.Maven
- development tool : The front end uses HBuilderX, The back end uses eclipse/idea
- project management : The front end uses npm、webpack, The back end uses Maven、SpringBoot
- web middleware : The front end uses NodeJS, The back end uses Tomcat
maven: download , management , compile jar package
A classic business request process :
front end html Page launch ajax request (http://localhost:8080/factoryController/findAll), visit SpringMVC Framework of the Controller Control layer ,SpringMVC Framework resolution request , Find one to call Controller, Find one findAll Method , At the same time, the parameters submitted by the request are encapsulated in java In the object . after Controller The layer passes the request to Spring Framework of the Service The business layer ,Service The layer is passing the request to Mybatis Framework of the Mapper Persistence layer ,Mapper visit MySQL Database queries database tables , The query result is returned to Mapper layer ,Mapper Return to Service layer ,Service Return to Controller layer .Controller hold java Data to json character string , Return to ajax call ,ajax Make a callback and put json String conversion to js object , In the page, you can pass js/vue analysis js object , Finally, show the data to html On the page .
Four characteristics :
1.reposity: Local repository , Create your own folder , For storage maven Download it from the image jar package
2. coordinate :
coordirate, For storing and searching jar The location of the package
groupId: Usually the company's domain name
artifactid: project id, Usually the name of the project
3. rely on : You can specify what you want <dependeneies/> Download the image warehouse to the local warehouse .
4. command : Common commands :
- clean Clean cache
- package pack jar、war
- install install jar To the local warehouse
3.IDEA plug-in unit
1.lombok:@Data: Act on a class , Is a collection of the following annotations :@ToString @EqualsAndHashCode @Getter @Setter @RequiredArgsConstructor
2.SpringBoot Thermal deployment : Changed the code , You don't have to restart , Just recompile to access the new data .SpringBoot The core mechanism : " Open the box " Just import specific jar Package file You can use the functions directly The root cause : SpringBoot It's a simplification of the framework , It's expanded internally , No programmer required .
4.json
JSON refer to JavaScript Object notation , A lightweight data exchange format
Send data to the server : take JS Conversion of objects JSON character string JSON.stringify(Js object )
Accept data from the server : JSON String to JS object JSON.parse("json character string ")
5. Database optimization
1. Use the field name in select Instead of *
2.where Use in and Instead of or
3. Use as much as possible varchar Instead of char, Use numbers instead of string types
4. The return value of the query should not be large
5. Build indexes to improve query efficiency
6.where Try not to use <> or != The operator
7. Optimize like sentence : Fuzzy queries are best started with certain characters
8. Batch insertion performance improvement
9. duplicate removal distinct Filter fewer fields
6.vue
1.vue Of ajax: Asynchronous access , Partial refresh
2.axios The request header Content-Type The default is application/json, and postman The default is application/x-www-form-urlencoded.
ajax/postman It is generally used @RequestParam Receiving parameters :
axiso use @RequestBody Of json Mode to receive parameters :@RequestBody, Will the incoming json Convert string to Json object
3.Vue Why is this called a framework : Applied to Observer mode : The observer pattern defines a one to many dependency , Let multiple observer objects listen to a target object at the same time , When the state of the target object changes , All observer objects will be notified , Enable them to update automatically .
边栏推荐
- web聊天室实现
- Unity脚本API—Component组件
- 输入宽度!
- In today's highly integrated chips, most of them are CMOS devices
- MySQL learning notes - data type (numeric type)
- Lombok使用引发的血案
- The 17 year growth route of Zhang Liang, an open source person, can only be adhered to if he loves it
- Shell programming basics
- Detailed explanation of MySQL composite index (multi column index) use and optimization cases
- hexadecimal
猜你喜欢
Quelles sont les perspectives de l'Internet intelligent des objets (aiot) qui a explosé ces dernières années?
Live broadcast preview | PostgreSQL kernel Interpretation Series II: PostgreSQL architecture
Optimization method of deep learning neural network
Unity animation day05
Numpy notes
MySQL学习笔记——数据类型(数值类型)
C1 certification learning notes 3 -- Web Foundation
中国主要城市人均存款出炉,你达标了吗?
. Net applications consider x64 generation
这几年爆火的智能物联网(AIoT),到底前景如何?
随机推荐
odoo数据库主控密码采用什么加密算法?
基于MAX31865的温度控制系统
压力、焦虑还是抑郁? 正确诊断再治疗
LNX efficient search engine, fastdeploy reasoning deployment toolbox, AI frontier paper | showmeai information daily # 07.04
Audio and video technology development weekly | 252
Unity脚本API—GameObject游戏对象、Object 对象
科研漫画 | 联系到被试后还需要做什么?
Decimal, exponential
进制形式
Unity脚本介绍 Day01
Redis shares four cache modes
PXE网络
The per capita savings of major cities in China have been released. Have you reached the standard?
[North Asia data recovery] data recovery case of database data loss caused by HP DL380 server RAID disk failure
Redis的4种缓存模式分享
Redis sentinel mode realizes one master, two slave and three Sentinels
MySQL learning notes - data type (2)
Shell programming basics
【学习笔记】拟阵
Unity script introduction day01