Java框架关于分层的构造我一直好蒙,求助

目前我所知道的信息中Hibernate和Mybatis是持久层框架
然后我想问的是
1.Spring有人说只是为了解耦以及提供一系列辅助功能(说业务层是按照自己的需求写的,和Spring没关系),但是又有人说它是业务层框架的说法,我有些懵逼,求大神解释。所以我想问它到底是不是业务层框架?
2.Spring MVC和Struts2 是表示层框架吗?有说法说Spring MVC是三层架构,不仅仅是表示层,还可以是模型层和控制层,作用很大,而Struts仅仅是表示层,这里我更懵逼了。
3.如果2中的框架真的是表示层框架的吗,那么JSP就是啥,我一直以为它是代表表示层的。求解各路大神

比如hibernate,主要是跟数据库交互的
struts2 主要是接收前端的请求,分发给对应的控制器处理
spring是解耦的没错,你看你控制器中需要的service都是通过注解注入进来的,不需要手动去new一个
但是SpringMVC却是可以独立的接收前端请求,并且内置了操作数据库的实现,所以springMVC可以完全代替struts2和hibernate

你把mvc和三层搞混淆了,mvc的v是表示层,m和c是业务层,因此mvc架构程序+dao才算三层。但是要注意,mvc框架不是mvc,好比烤面包机不是面包。
jsp、struts等为你的代码提供支持,但是它们本身不算分层。spring是ioc/aop框架,又是另一个概念了。

  1. Spring is an IoC container (at least the core of Spring) and is used to wire things using dependency injection. Spring provides additional services like transaction management and seamless integration of various other technologies.
  2. Struts is an action-based presentation framework (but don't use it for a new development).
  3. Struts 2 is an action-based presentation framework, the version 2 of the above (created from a merge of WebWork with Struts).
  4. Hibernate is an object-relational mapping tool, a persistence framework.
  5. JavaServer Pages is a view technology used by all mentioned presentation framework for the view.

So, to summarize:

  1. Struts 2(and Spring MVC) are presentation frameworks. If you use one of them, you don't use another.
  2. Hibernate is a persistence framework and is used to persist Java objects in a relational database.
  3. Spring can be used to wire all this together and to provide declarative transaction management.