欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

spring boot

程序员文章站 2022-03-04 13:54:03
...
  1. pom.xml
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql:///pinyougoudb?serverTimezone=UTC
    username: root
    password: 123456

  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: Asia/Chongqing

  mvc:
    view:
      prefix: /
      suffix: .html
server:
   port: 8080
   servlet:
  1. application.yml
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql:///pinyougoudb?serverTimezone=UTC
    username: root
    password: 123456

  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: Asia/Chongqing

  mvc:
    view:
      prefix: /
      suffix: .html
server:
  port: 8080

  1. 创建类/html
  2. 导入
$.ajax({
            url: "validata?id=" + str, success: function (result) {
               if(result > 0){
                   $.post("add",{ids:str},function(obj){
                      alert("添加成功");
                       window.location.href='catList';
                   })
               }else{
                    alert("没有库存");
               }
            }
        });