-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure datasource and mybatis-plus #29
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the helper script, we use the wrong password to login the server. We used the password for the user in database rather in the OS, which is wrong. We did not find this bug before because we use the same password for both the user in database and the user in OS.
We use druid as datasource, and finish the configuration for it. This should solve #26.
In this commit, we add the `mybatis-plus` dependency to the `pom.xml` file, and configure the `mybatis-plus` in the `application-dev.yml` file. We also add the `UserMapper` interface and `UserPO` class to the project for testing. The `UserMapper` interface is used to define the database operations (the real operations will generated by `mybatis-plus`), and the `UserPO` class is used to define the user entity. We use `spring-boot-test` to test this function (I've add one item in the `t_user` table). This solved #28.
Kaiser-Yang
force-pushed
the
database-kaiser
branch
from
August 20, 2024 12:48
a5f9e44
to
157992a
Compare
Kaiser-Yang
changed the title
[WIP] Database kaiser
Configure datasource and mybatis-plus
Aug 20, 2024
We find that the deploy_helper.py script will fail if the `application.properties` file is not empty. This is because the `write` in `Python` will not add `\n` automatically. So we need to add a new line after writing the content to the file.
Kaiser-Yang
force-pushed
the
database-kaiser
branch
3 times, most recently
from
August 20, 2024 13:21
4549106
to
6167ca7
Compare
Kaiser-Yang
force-pushed
the
database-kaiser
branch
from
August 20, 2024 14:13
4c3a735
to
38557c5
Compare
Kaiser-Yang
force-pushed
the
database-kaiser
branch
from
August 20, 2024 14:23
6b06e80
to
6652e9e
Compare
Kaiser-Yang
added
the
project initialization
Building the project framework for the first time
label
Aug 20, 2024
luckygalaxy666
approved these changes
Aug 20, 2024
Quentin9922
approved these changes
Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
一共包含三个提交。
druid
数据源)。mybatis-plus
的配置。druid
数据源提供数据监控的功能,通过部署脚本启动后,可以访问http://localhost:8080/druid/login.html
可以进入登录界面,默认的用户名和密码均为druid
,登录后可以看到监控界面:在我事先向数据库插入一条表项后,测试的结果如下(
mvn test
进行测试):新增两个提交:
application.properties
不为空的时候部署失败的问题。format
的时候,JDK
默认版本为11
会导致格式化失败的问题。新增一个提交: