-
04-表现层与前端数据传输
-
17-SSM整合(整合配置)
-
18-SSM整合(功能模块开发)
-
19-SSM整合(接口测试)
-
20-SSM整合-表现层与前端数据传输协议定义
-
21-SSM整合-表现层与前端数据传输数据协议实现
-
17-SSM整合(整合配置)
ssm整合框架搭建
-
18-SSM整合(功能模块开发)
功能开发完成,对一张表进行增删改查
-
19-SSM整合(接口测试)
接口开发完成要用junit进行测试
表现层开发完成要用postman做测试
业务层测试代码
import com.itheima.config.SpringConfig; import com.itheima.domain.Book; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = SpringConfig.class) public class BookServiceTest { @Autowired private BookService bookService; @Test public void testGetById(){ Book book = bookService.getById(1); System.out.println(book); } @Test public void testGetAll(){ List<Book> all = bookService.getAll(); System.out.println(all); } }
用postman测试controller
-
20-SSM整合-表现层与前端数据传输协议定义
前端觉得数据格式太多,需要整合格式
前端和后端人员通讯的协议,确定格式
-
21-SSM整合-表现层与前端数据传输数据协议实现