A demo for using vue and springboot. It's a simple tiny machine management which can add、query、update or delete the machines. The project dosen't think about the security which may be completed in the future.
- Element
- VUE
- Springboot
- Mybatis
├─DB // the sql file, which to creat the table in database
├─src // the source code for java and html
│ ├─main
│ │ ├─java
│ │ └─resources
│ │ ├─mapping // mybatis sql files
│ │ └─static // the html and css files will be placed here
- Execute the file in DB directory to create the table in database.
- Edit the file
src/main/resources/application-dev.yml
, change properties value of database. Making sure it can connect to the database successfully. - Open the terminal window in the root directory of this project and run the command:
mvn spring-boot:run
- Open the browser and enter
localhost:8080
- Guest can only query or have a look at the machines while the administrator can add、update and delete the machines if he is login. There is only one account whose username is
admin
and the password isadmin
. If you want to change the password, write amain
function incom.guozhchun.util.EncryptUtil
and call functioncom.guozhchun.util.EncryptUtil#encrypt
inside themain
function. The input parameter ofencrypt
is aString
which is the password you want to change and the output of this function is the encrypt password. You should change the value ofcom.guozhchun.service.LoginService#ADMIN_ENCRYPTION_PASSWORD
with the encrypt password you just get. Finally, you should recompile and run the application and then you can login with the new password. - The default language is Chinese and you can change it to English by click the button
English
on the upper right corner of the page.
- initial the project with the basic CRUD
- add the condition query
- add the control for administrator
- add the internationalization