摘要:
查询女生操作创建GirlControllerpackage com.girl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation... 阅读全文
摘要:
使用数据库首先要pom文件当中添加两个依赖mysql-connector-javaspring-boot-starter-data-jpa然后创建数据实体package com.girl; import org.springframework.data.annotation.Id; import javax.persistence.Entity; import javax.persistenc... 阅读全文
摘要:
在application.properties当中配置端口号server.port=8081在application.properties当中配置项目路径server.context-path=/girl启动项目访问 localhost:8081/girl/hello也可以将 pplication.properties也可以写成application.yml文件通过注解,将application.... 阅读全文
摘要:
@Controller@ResponseBody等同于RESTControllerRequestMapping的使用给同一个方法指定多个RequestMapping给类添加RequestMapping指定RequestMapping的()method属性如何处理URL里面的参数?@PathVariable的使用:http://127.0.0.1:8080/hello/say/243http://1... 阅读全文