当前位置:网站首页>Handwritten blog platform ~ the next day
Handwritten blog platform ~ the next day
2022-07-24 17:57:00 【51CTO】
To readers
Now the environment, are you all ready ?
Then the next step is real development ,Idea I didn't give you the download link on the official website , Now here you are : https://youtrack.jetbrains.com/articles/IDEA-A-21/Release-Notes
I downloaded it 2021.3.2 Of , Corresponding “ Continuous learning ” Development jar package
Sky wing cloud disk Cherish the good life Family cloud | Network disk | File backup | Resource sharing ( Access code :6in8)
The recommended Idea To configure : Probably the best use IDEA Set up _ Zhangzhishuai The blog of -CSDN Blog
“ Continuous learning ” The configuration file :
Two ways :
- The first one is :
Put the downloaded package in the right place , Yes ja-netfilter.jar Hold down Shift Right click the mouse to copy the path , If it can be opened Idea Development tools , Go to help–>Edit Custom VM Options Copy the content in .
- The second kind :
open Idea The installation directory bin Under the idea64.exe.vmoptions file , Copy “ Continuous learning ” Configuration information goes in , Just reopen .
The chicken soup cooking time is over , It's time for development
1. Create project
open Idea Manually create a maven Empty item , Include several module folders
- step :
File --> New --> Project --> Maven --> Select corresponding Project SDK( namely JDK) --> Next --> Name --> Localtion --> GroupId(com.fyupeng)–> ArtifactId(fyupeng-blog) --> Version(1.0-SNATSHOT)
- Directory structure :
– fyupeng-blog
– fyupeng-blog-commons
– fyupeng-blog-pojo
– fyupeng-blog-mapper
– fyupeng-blog-service
– fyupeng-blog-api
establish 1 individual Project 5 individual Model,model Is in File --> New --> Model Next
After the operation is completed and no error is detected , Open the root directory pom.xml
2. Configuration dependency and configuration information
– fyupeng-blog
– fyupeng-blog-commons
– fyupeng-blog-pojo
– fyupeng-blog-mapper
– fyupeng-blog-service
– fyupeng-blog-api
commons It mainly includes public api package
You can directly download what I often use , link : GitHub - fyupeng/SoftWare: Software download address
Develop the first interface :
stay api Resource directory in the module (resources) Add files to application.properties file
Add two lines of configuration information :
application.properties
Add log file , Make the log effective
log4j.properties
General configuration files use unicode code , Decode when necessary , Otherwise, it is easy to get garbled
Provide Unicode Online codec tools : On-line Unicode Encoding conversion -Unicode and ASCII Online transfer - Chinese to Unicode Tools
3. Write the first interface
api New China controller Catalog
BasicController It is mainly used to configure basic static variables , Supply inherits its subclasses Controller Use
HelloController First interface
Interface document : http://localhost:8080/swagger-ui.html
Access the first interface :
http://localhost:8080/HelloWorld/helloWorld

Edit switch to center
Add picture comments , No more than 140 word ( Optional )
Here is a CSDN Online serialization plug-in : CSDN Development Assistant
4. Reverse engineering
What to do next : Reverse engineering ( As the name suggests, I am too lazy to write by myself pojo Layer and the mapper layer )
Reverse engineering links : GitHub - fyupeng/mybatis-generator: mybatis Reverse engineering
- Create database users
- Grant user rights
- Tips :
with grant option: Multiple authorization can superimpose permissions
Here you can use ' user name '@' host '
When authorizing , Not available ' database .' surface ', You can use the database name @‘ surface ’
Reverse engineering creates User surface , I'm using Navicat
Reverse engineering I provide two :
- An interface :
Interface oriented uses maven project
Just configure jdbc Relevant connections and database tables
- Configuration oriented :
Configuration oriented uses xml The configuration file
Just configure jdbc Relevant connections and database tables
Maximize and reduce development costs , I use interface oriented development
First put the generated files into the corresponding model in ,util Under the MyMapper Put it in commons Under bag utils Next
Configuration database jdbc Connection pool , Need to application.properties Add configuration information to :
And then there are mapper.xml file , Put it in mapper Modular resources in mapper Under the folder
This folder needs to be told springboot Scan and put the instance object into spring In the container , So it can be application.xml Add configuration information :
Preliminary Configuration completed
6. Develop the second interface
For testing MySQL database
Data table garbled , Lead to ERROR 1366 (HY000): Incorrect string value: '\xE5\xB0\x8F\xE6\x98\x8E' for column 'name' at row 1
You can use the following method to set , All fields will take effect
If the database is created, attach default charset=utf8 Can solve the problem of disorderly code

Edit switch to center
Data sheet
More wonderful on the third day , Hiccup kid paper is continuing to follow up …
Any bug Feel free to contact the author , I will solve your doubts as soon as possible , Let's finish this job together , Just do other more interesting things together, haha .
By the way, I would like to share with you the completed blogs , This development is the second development , The main thing is to share what you have learned , Of course, I will definitely gain something !
I'll give you the link tomorrow , I hope to see you tomorrow !
By the way, I would like to share with you my technical column in recent years : https://github.com/fyupeng
边栏推荐
- Alibaba 1688 keyword search product API usage display
- es(1)
- SSM framework learning
- 还在用命令行看日志?快用Kibana吧,可视化日志分析YYDS!
- Tensorflow introductory tutorial (38) -- V2 net
- Awk from getting started to getting into the ground (19) awk extensions make awk even stronger
- C language custom types - Enumeration
- C语言自定义类型讲解 — 结构体
- 深入解析著名的阿里云Log4j 漏洞
- Trends of semiconductor industry
猜你喜欢

OpenCV 图片旋转

Stream, file, IO

Colleges and universities have introduced 23 Philippine doctors with heavy funds, and the relevant departments have launched an investigation!

Practical application cases of digital Twins - Smart Park

实习报告1——人脸三维重建方法

C语言自定义类型 — 枚举

Codeforces Round #794 (Div. 2)(A.B.C)

Tensorflow introductory tutorial (38) -- V2 net

Laravel笔记-用户登录时密码进行RSA加密(提高系统安全性)

Get the data of Tongcheng (elong) Hotel
随机推荐
PXE高效批量网络装机
After separation, the impression notes are still difficult to live, but there are many coquettish operations
2.3.1 view drawing process
New can also create objects. Why do you need factory mode?
es(1)
ShardingSphere数据库读写分离
0612~quartz定时器框架
Mac database management software Navicat premium essentials mac
awk从入门到入土(19)awk扩展插件,让awk如虎添翼
Getaverse, a distant bridge to Web3
Blackmagic Fusion Studio 18
还在用命令行看日志?快用Kibana吧,可视化日志分析YYDS!
SV casts and constants
[leetcode] 30. Concatenate substrings of all words
ROC and AUC details of the recommended system
手写博客平台~第二天
700. Search DFS method in binary search tree
C语言编程训练题目:左旋字符串中的k个字符、小乐乐与欧几里得、打印箭型图案、公务员面试、杨树矩阵
mac数据库管理软件Navicat Premium Essentials Mac
Detailed explanation of ansible automatic operation and maintenance (V) the setting and use of variables in ansible, the use of jinja2 template and the encryption control of ansible