05 2020 档案
摘要:第一步. 在controller层加上注解:@CrossOrigin 第二步. 在方法里添加获得数据的请求方式:method = RequestMethod.POST 如此快速解决
阅读全文
摘要:/******************************超过两行换行*****************************************/ display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2
阅读全文
摘要:aop主要用于日志记录,跟踪,优化和监控 下面是来自慕课网学习的一些案例,复制黏贴就完事了,注意类和方法的位置 pom添加依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-star
阅读全文
摘要:报错信息: Could not transfer artifact org.mybatis.spring.boot:mybatis-spring-boot-starter:pom:2.1.2 from/to alimaven (http://maven.aliyun.com/nexus/conten
阅读全文
摘要:今天碰到的一个低级错误 如果springboot无法加载静态资源css和js文件,有以下可能出现的情况,而我是最后一种!!! (1)未设置静态扫描路径,这有两种方式 第一个方式: 创建一个MyConfig类继承WebMvcConfigurerAdapter package com.bo.bookdb
阅读全文
摘要:springboot整合mybatis,利用mybatis-genetor自动生成文件 项目结构: xx 实现思路: 1.添加依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4
阅读全文
摘要:首先声明: @Controller注解的类必须要在启动类的子集目录下,否则无法扫描 本文要求: 通过controller层跳转页面到html页面(本篇用到thymeleaf模板) 项目结构展示: 第一步:pom.xml <dependency> <groupId>org.springframewor
阅读全文