The problem of forward and backward slashes in java url string

Problem phenomenon:

I encountered a small problem in the project today:

When writing data to the library, the data has not been obtained!


problem analysis:

After analysis, it is because I directly copied the file path of a certain file in the url, and then pasted it into the string, and found that the / in the copied path was automatically replaced with // 


Solution:

Change the // in the string to / or \

Guess you like

Origin blog.csdn.net/weixin_42585386/article/details/109628274