建立一個SSM專案的要點
阿新 • • 發佈:2018-11-05
1.指定一個目錄作為workspace,Preference配置如下內容
Preference->General->workspace,Text File Encoding改成UTF-8 Preference->Web->JSP Files,Encoding改成UTF-8 Window -> Preferences -> General -> Content Types -> Text -> Java Properties File -> UTF-8 -> Update -> OK
Window -> Preferences -> Java -> Editor -> Content Assist -> Auto Activation
加上”.abcdefghijklmnopqrstuvwxyz”
2.新建Maven專案,勾選第一行(Create a simple project),填寫Group Id和Artifact Id後Packaging選擇war,
專案建立之後缺少web.xml,右鍵專案,Java EE tools,點選Generate Deployment Descriptor Stub.
3,右鍵專案屬性,Java Build Path,修改JRE System Library為Workspace default JRE,這裡是1.8
Java Compiler選擇1.8,Project Facets中的Java也需要選擇1.8.(注意preference 中的Installed JRE->Execution Environments
JavaSE-1.8, 右邊勾選上)
4