当前位置:网站首页>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
边栏推荐
猜你喜欢

The use and Simulation of character and string library functions in C language

Practical application cases of digital Twins - Smart Park

C语言自定义类型讲解 — 结构体

PXE高效批量网络装机
How to remove the top picture of the bubble skin article details of solo blog

Interview assault 66: what is the difference between request forwarding and request redirection?

分家后印象笔记过日子依然不好过,骚操作却不少

手写博客平台~第二天

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

深入解析著名的阿里云Log4j 漏洞
随机推荐
Brats18 - Multimodal MR image brain tumor segmentation challenge continued
Codeforces Round #794 (Div. 2)(A.B.C)
Blackmagic Fusion Studio 18
T245982 「KDOI-01」醉花阴
[leetcode] 30. Concatenate substrings of all words
C language custom type explanation - structure
700. 二叉搜索树中的搜索-dfs法
Can CSC open an account for domestic futures? Is it safe?
What are the pitfalls from single architecture to distributed architecture?
运维小白成长记——架构第8周
Development Series III of GaN (lapgan, srgan)
Alibaba /166 obtains the API instructions for all products in the store
PXE efficient batch network installation
Is header file required? Follow the compilation process~~~
es(1)
0616 end of Project II ~ ~ general summary
0615~用自定义注解实现RBAC权限管理
sklearn 的模型保存与加载使用
JS & TS learning summary
《STL源码剖析》应该怎样读?