选择!
选择jdk
3导入模板
4输入名称
创建文件夹
更改配置文件
``
server:
port: 10086
spring:
datasource:
url: jdbc:mysql://localhost:3306/test
username: root
password: Zc-1995-0513
driver-class-name: com.mysql.cj.jdbc.Driver
mybatis:
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.example.yaoxx1demo.pojo
测试接口
package com.example.yaoxxx1demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
- @Version 1.0
- @Author:ylh
- @Date:2021/5/6
- @Content:
*/
@Controller
@ResponseBody
@RequestMapping("/test")
public class Test {
@RequestMapping("/test")
public String test(){
return “hello ss2sss”;
}
}