在conf目錄下tomcat-users.xml文件裏添加以下代碼:tomcat
<role rolename="manager-gui"/>ui
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>spa
<user username="admin" password="admin" roles="manager-gui"/>