Home > Java > javaTutorial > How to solve Java development problems based on Bootstrap

How to solve Java development problems based on Bootstrap

WBOY
Release: 2023-06-02 12:22:06
forward
1361 people have browsed it

1. Menu

Building a menu in Bootstrap is a very easy thing. Because there is a dedicated menu management, it is relatively easier than the previous menus. Just click on menu management to add the required menu. As shown in the figure below:

How to solve Java development problems based on Bootstrap

After adding the menu, it cannot be displayed because no permissions have been assigned to the menu. Next, authorize the menu in role permission management. After logging in with an authorized account, you can see the menu you just added.

2. Upload pictures

It took a long time to upload pictures. At first I thought the image upload function had been successfully implemented. But when I looked back, I realized there was a problem.

Question 1:

Because I have to upload three pictures in total, the problem I encountered is that every upload is successful, but the data in the database is forever The last record saved. Finally, it was discovered that the parameters of the method were written incorrectly. The original call was to delete object entities based on multiple attributes. It turned out that two parameters new String[] { "type", "typeId" } were written in the parameters of the method. It was the second parameter typeId that caused every deletion. are all records of the user. Finally, it was changed to new String[] { "type", "imgId" }, and the second parameter was changed to imgId and deleted each time according to the type of the image. Each change only changes the corresponding picture, avoiding deleting all pictures of the same user.

Question 2:

After the upload is successful, the page cannot be displayed. The problem is that the previous method was to only upload one image, and the image path after each upload was saved to filePath. However, now after uploading three images, the image path for each upload will be saved to filePath, which means that the second The path of the image uploaded this time will overwrite the path of the previous one each time, so the display effect of the three images on the page will always be the same photo.

Finally, in the page to be displayed, the image uploaded by the user is displayed on the page from the attachment table, thus avoiding the problem that only one path can be saved in filePath!

How to solve Java development problems based on Bootstrap

The above is the detailed content of How to solve Java development problems based on Bootstrap. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template