eclipse+maven+spring mvc

 

关键词:eclipse+maven+spring mvc

资源:

1. https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Artifacts

2. https://repo.spring.io/webapp/#/artifacts/browse/tree/General/libs-milestone

 

具体介绍

MVC全名是Model View Controller,是模型(model)-视图(view)-控制器(controller)的缩写,

    Model- 模型包含了应用程序的核心数据。数据可以是单个对象,也可以是一组对象。
    Controller - 包含了应用程序的业务逻辑。你可以使用 @Controller 注释来标记该类为 Controller。
    View - 基本上,视图是用来表示特定格式的信息。在这里,你可以使用JSP+JSTL来创建一个视图页面。
    前端控制器 - 在Spring Web MVC中,DispatcherServlet类作为前端控制器工作。

  Model – Model contains the core data of the application. Data can either be a single object or a group of objects.
    Controller – It contains the business logic of an application. You can use @Controller annotation to mark the class as Controller.
    View – Basically, the View is used to represent the information in a particular format. Here, you can use JSP+JSTL to create a view page.
    Front Controller – In Spring Web MVC, the DispatcherServlet class works as the front Controller.

 

方法1:https://www.bilibili.com/video/BV1R4411E7gQ?from=search&seid=12534786194527526873

1.配置环境变量,maven;

2.Source Folder 概念

Source Folder里的文件会被编译或复制到builder class目录,编译后的文件是透明的——即不存在src/mian/java 等包的概念,这里同一个项目里的包的各个文件名不可以同名!

3.创建一个web app

结果:在运行后报错,估计初步定位是tomcat7的原因。

 

方法2:https://www.jb51.net/article/169893.htm

在配置setting时失败,后面的包也失败,估计是build。

 

方法3:https://blog.csdn.net/qq_26687255/article/details/90054165

这里基本没问题。

    src/main/java  //主体代码,如java类
    src/main/resources  //资源文件:如application.properties,放置密码之类
    src/test/java  //测试代码,如test.java
    src/main/webapp     //前端文件,如html,jsp,css

这里报错了。

 

 

https://crunchify.com/simplest-spring-mvc-hello-world-example-tutorial-spring-model-view-controller-tips/

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值