2021年10月9日
摘要:
1.@Controller 标注在类定义前,表示该类为一个控制器。 该注解有一个value参数,表示该控制器的名称。 比较典型的用法是配合@RequestMapping注解一起使用。 @Controller @RequestMapping(value="/index") public class H
阅读全文
posted @ 2021-10-09 11:27
pcant
阅读(55)
推荐(0)
摘要:
1.spring MVC支持的ant风格的路径 ?:表示任意的单个字符 如:@RequestMapping("/test?/hello") *:表示任意的0个或多个字符 如:@RequestMapping("/test*/hello") **:表示任意的一层或多层目录 如:@RequestMappi
阅读全文
posted @ 2021-10-09 00:45
pcant
阅读(617)
推荐(0)
2021年10月8日
摘要:
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.developing-web-applications.spring-mvc Spring Boot provides auto-config
阅读全文
posted @ 2021-10-08 18:00
pcant
阅读(341)
推荐(0)
2021年10月3日
摘要:
1.@PropertySource注解 Annotation providing a convenient and declarative mechanism for adding a org.springframework.core.env.PropertySource to Spring's o
阅读全文
posted @ 2021-10-03 15:44
pcant
阅读(137)
推荐(0)
2021年10月2日
摘要:
二、将mybatis整合到spring框架中 参照mybatis官方文档:http://mybatis.org/spring/zh/getting-started.html 官方文档介绍中,对Mapper的注入使用的是xml配置文件,本文使用的java代码配置实现。 代码结构: 1.使用eclips
阅读全文
posted @ 2021-10-02 10:07
pcant
阅读(134)
推荐(0)
摘要:
一、单独使用mybatis 参照mybatis官方文档 https://mybatis.org/mybatis-3/zh/getting-started.html 整体代码结构: 1.使用eclipse新建一个maven项目,将项目的java编译器版本修改为1.8。 或者通过修改pom.xml文件,
阅读全文
posted @ 2021-10-02 00:04
pcant
阅读(617)
推荐(0)
2021年7月22日
摘要:
转自:http://ifeve.com/useful-jvm-flags/ JVM实用参数系列 原文发表于CodeCentric博客,经原作者Sven Ruppert授权由并发编程网翻译并分享。 JVM是Java Virtual Machine(Java虚拟机)的缩写,Java通过使用Java虚拟机
阅读全文
posted @ 2021-07-22 09:17
pcant
阅读(31)
推荐(0)
2021年6月14日
摘要:
Alt + shift + S 调出快速创建setters()、getters()、toString()等方法的菜单。 Alt + 向左方向键 , 返回上一代码点。 Ctrl + D删除光标所在行。 Ctrl + Shift + R 查找资源。
阅读全文
posted @ 2021-06-14 16:37
pcant
阅读(46)
推荐(0)
2021年6月9日
摘要:
JDK8新增的函数式编程 FunctionalInterface跟Interface相似,但是只能有一个抽象方法,可以有多个默认的实现,不能有其他已实现的方法。 1.使用@FunctionalInterface注解 2.必须要有一个抽象方法,且只能有一个抽象方法,不能有非抽象方法 3.可以有多个特定
阅读全文
posted @ 2021-06-09 09:49
pcant
阅读(190)
推荐(0)
2021年6月4日
摘要:
https://docs.spring.io/spring-framework/docs/5.3.x/reference/
阅读全文
posted @ 2021-06-04 09:07
pcant
阅读(220)
推荐(0)