About maven --- Chinese data obtained from the html page of the maven project is passed to mysql through the dao layer to garbled

In the url of druid.properties in the maven project, change it to

url=jdbc:mysql:///travel?characterEncoding=UTF-8

In this way, the data transferred to mysql is Chinese data, of course, the data encoding format in mysql should be changed to utf-8 in advance

Guess you like

Origin blog.csdn.net/Forest_2Cat/article/details/108974852