Import ssm javaweb maven project idea

 In this paper the author hard finish, in addition to the existing project configuration and to facilitate convenient installation maven posted, as reproduced please specify:

https://www.cnblogs.com/m-yb/p/11229320.html

Import ssm javaweb maven project idea

Demonstration project code address, it is recommended to use git to download a shortcut, you can also download the self-extracting zip,

https://github.com/TyCoding/ssm

Should configure maven, a download manager tool jar package,

Omitted here, I found a blog for reference:

One hour to learn Maven,

https://www.cnblogs.com/best/p/9676515.html

View graph of the focus ring can be configured,

After maven things right, open the idea,

The top left file -> 

Select the project, general project selection project root path in general, maven maven pom.xml file in the project selection can,

 The following items are configured jdk path corresponding to the desired version

Project name, project file path

Generating .idea or cover profile such idea,

New projects in the new window opens,

First set maven path of the project,

settings can be set for the current project configuration items, other settings are configured globally,

Here you can set maven configure global project, go after,

① maven installation configuration file in the root directory ② ③ configuration file to configure maven maven settings local warehouse jar package,

Next, configure the project structure,

Then click the View project after opening, jdk version of configuration items and java compiler-generated class file output path,

Down it is to configure the project sub-modules:

 libraries are dependent jar package,

Here is the web of facets

Focus on the web, if new web + is selected, also check whether web portal web.xml path is correct, check the webapp root directory is correct

 

Here artifacts of the project is to put the compiled file, 

 

Note that the right-lib packages are put into the project, the compiler need to reference the project's output path where the folder can be deleted at any time re-compiled, delete query compiler bug to cope not compiled into the lead when the code is not in force,

检查sdks/jdk, 如果problems提示,则可参考提示处理, 最后ok, 项目配置基本完成, 下一步配置tomcat.

tomcat看图:

依次选择+...,

 建议命名为tomcat版本, 注意项目需要的jdk版本往往是特定范围, 包括对应的tomcat版本也要注意, 启动访问报错可能有版本问题导致, 这里也关注下端口号比如8080和访问路径, 启动完打开浏览器的那个√建议放弃, 另外下附配置本地tomcat的图

 

 

注意添加启动之后部署的应用, 

context这里配置为项目期望的路径,

最后apply,ok即可.

启动之前最好建好需要的数据库, 并执行sql建表查表语句等, 改好数据库名, 用户名,密码

 

一是直接启动(非debug), 而是debug启动tomcat, 建议debug启动, 方便调试,

 debug启动完成后(注意屏蔽断点),

如果successfully启动, 这里启动用了6s, 时间合理, 资源加载成功,

浏览器访问, 注意自己刚才对应的路径

http://localhost:8080/ssm/

成功跳转index.jsp, 默认登录页, 完成~

笔者很熟练的部署好了项目, 自己弄也就一会吧, 写博客就多废了点时间, 先睡吧~

Guess you like

Origin www.cnblogs.com/m-yb/p/11229320.html