Some problems encountered when deploying Pengye Forum

1. At the beginning, the corresponding database url was newly modified in the yml file, and the database was created with a new name, but there was still an error when running the project, because there was a sql script in the project, and the previous database name was also in the script. So I had to create a database with the same name as the project.

2. When deploying and uploading projects, I mistakenly thought that new projects can only be uploaded on the svn server side, but in fact, new projects can be uploaded on the client side.

In a checked out project folder (the following folder 1 is the project I checked out from svn) , right-click on the blank space -> TortoiseSVN -> Repo-browser, so that you will reach the directory of the svn server, which currently exists svn project directory

Then you can upload your new local project to SVN. Through the red framed file, you can select the directory you want to upload, select the directory, right-click -> Add folder, and find your local project to upload

3. Later, choose to use the jar package to run, in the project packaging, first clean it in packpage, and then find the jar package in the target package.

4. The jar package is cross-platform, so I want to test the jar package in the windows system at the beginning, switch the d disk in the windows cmd directly d: you can

5. When executing the jar package with java -jar xx.jar in the command window, use ctrl+c to stop running, but if you simply use the jar command, the project will stop running after closing the command window, so it is best to use a script File start and stop

Linux script files are .sh files. If Linux does not recognize the script file, it may be that there is no execution permission or the file is written under windows, and the format needs to be converted.

In addition, I found that when the jar package was not used before, the sh script executed in the project turned out to be an mvn command, and I will look into it later

6. When executing the startup jar package, I encountered Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/PropertiesLauncher: Unsupported major.minor version 52.0

The reason is that the sdk of the jar package is inconsistent with the system. Later, I checked that the sdk of Linux was 1.7, and the project used 1.8. Later, I learned that the version of java can be set in the pom file, but the lambda expression used in the project must be Use 1.8 so you can only install 1.8

7. Originally I wanted to download from the official website, but later found out that I could go to other servers of the company to copy. Without ftp, I could use the scp command to transfer files. For example:

scp -r /home/bigdata/application/soft/jdk1.8.0_221 [email protected]:/home/bigdata/application/soft

8. When configuring environment variables in the etc profile of linux, I found that it did not work. After understanding, I knew that environment variables could be configured in other files. Since I couldn't find where I was, I deleted the old jdk. Then I found out that I The configured environment variables still did not work

I couldn’t find any information with rpm -qa | grep jdk. Later I realized that this command could only find the directory. Finally, I realized that the system variable path was wrong (there was no prompt).

 

Guess you like

Origin blog.csdn.net/m0_37839403/article/details/114889610