This deployment method is suitable for deploying on physical machines after modifying the code.
Install Plugin Deployment
Install the plugin in IntelliJ IDEA.
Configure the target machine address.
Add a new startup item.
Configure the startup item.
- Path to the
jar
file to be uploaded. - IP address of the target machine, add using the + button on the right.
- Path on the target machine to upload to.
- Command to execute after uploading, for example, execute the restart script below.
- Compilation command to execute before uploading.
Script link: restart-springboot.sh
#!/dash
# Restart blossom
pid=`ps aux | grep backend-blossom.jar | grep -v grep | awk '{print $2}'`
echo "Process ID: " $pid
kill -9 $pid
echo "Process" $pid "has been killed"
echo "Restarting the backend-blossom server"
# Remember to modify related configurations
nohup java -jar ./backend-blossom.jar --server.port=9999 --project.iaas.blos.domain="http://192.168.31.99:9999/pic/" --spring.datasource.url="jdbc:mysql://192.168.31.99:3306/blossom?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&allowMultiQueries=true&useSSL=false&&serverTimezone=GMT%2B8" --spring.datasource.username=root --spring.datasource.password=jasmine888 &
echo "backend-blossom is starting, please check the log ↓↓↓↓↓↓↓↓↓↓↓↓↓↓"
#!/dash
# Restart blossom
pid=`ps aux | grep backend-blossom.jar | grep -v grep | awk '{print $2}'`
echo "Process ID: " $pid
kill -9 $pid
echo "Process" $pid "has been killed"
echo "Restarting the backend-blossom server"
# Remember to modify related configurations
nohup java -jar ./backend-blossom.jar --server.port=9999 --project.iaas.blos.domain="http://192.168.31.99:9999/pic/" --spring.datasource.url="jdbc:mysql://192.168.31.99:3306/blossom?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&allowMultiQueries=true&useSSL=false&&serverTimezone=GMT%2B8" --spring.datasource.username=root --spring.datasource.password=jasmine888 &
echo "backend-blossom is starting, please check the log ↓↓↓↓↓↓↓↓↓↓↓↓↓↓"
Check Configuration Items
The various parameters you configured will be displayed at the top of the startup log.
Check if the Application Has Started Successfully
Method One: View Logs
If the bottom of the log displays the following content, it means the application has started successfully.
Method Two: Direct Access
For example, if you deploy locally, you can access 127.0.0.1:9999
. If it returns the following content, it means the deployment was successful.
{
"code": "AUTH-40101",
"msg": "Invalid authorization information",
"ex": "Invalid authorization information",
"data": null
}
{
"code": "AUTH-40101",
"msg": "Invalid authorization information",
"ex": "Invalid authorization information",
"data": null
}
This message means you are not logged in, and you can now log in to use the client.
Install the Client and Log In
After successfully deploying, you can use the client to log in. Blossom provides two types of clients:
- Download the PC Desktop Client.
- Use the built-in web client.
The web client address is:
IP:Port(domain)/editor/#/settingindex
For example, if the IP:Port is
127.0.0.1:9999
, visithttp://127.0.0.1:9999/editor/#/settingindex
For example, if the domain is
http://www.abc.com
, visithttp://www.abc.com/editor/#/settingindex
If you have configured a reverse proxy path, like
/bl/
, visithttp://www.abc.com/bl/editor/#/settingindex
Attention!
This address is for accessing the web, not the login address! Enter it in the browser's address bar!
When you open the client, you will enter the login page.
Enter the access address of the backend in the top, then log in using the default username and password.
- Username:
blos
, Password:blos
Attention!
The access address does not include /editor/#/settingindex
!!!
After logging in, it's recommended to change the default user's username and password to use it as your main account, because the built-in blog part of the backend only supports users with ID 1
.
Quick Setup
If you are a first-time user, you will see the following prompt in the upper right corner of the page.
Click on the flashing yellow icon to enter the following page.
Click on any red box above to start quick configuration.
Click on [Yes] to enter the blog configuration.
Usually, clicking on [Confirm using the built-in blog] will complete the configuration.
- For more about quick setup features, see Settings.
- For more information about blog configuration, see Blog/Mobile Page.