Creating the POM <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.…
Spring Boot uses a very particular PropertySource order that is designed to allow sensible overriding of values. Properties are considered in the following order: Devtools global settings properties on your home directory (~/.spring-boot-devtools.pro…
Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added. For example, if HSQLDB is on your classpath, and you have not manually configured any database connection be…
commons-logging和slf4j是java中的日志门面,即它们提供了一套通用的接口,具体的实现可以由开发者自由选择.log4j和logback则是具体的日志实现方案. 比较常用的搭配是commons-logging+log4j,slf4j+logback 为什么要用SLF4J+Logback 替换commons-logging+log4j? SLF4J是编译时绑定到具体的日志框架,性能优于采用运行时搜寻的方式的commons-logging 不需要使用logger.isDebugEna…
想要使用devtools支持,只需使用dependencies将模块依赖关系添加到你的构建中 运行打包的应用程序时,开发人员工具会自动禁用.如果你通过 java -jar或者其他特殊的类加载器进行启动时,都会被认为是“生产环境的应用”. 功能 去除服务器端缓存.客户端缓存默认设置 Spring Boot 支持的一些库中会使用缓存来提高性能.例如模版引擎将缓存编译后的模板,以避免重复解析模板文件. 此外,Spring MVC可以在服务静态资源时向响应中添加HTTP缓存头. 虽然缓存在生产中非常有益…
If you do not want to use the spring-boot-starter-parent, you can still keep the benefit of the dependency management (but not the plugin management) by using a scope=import dependency, as follows: <?xml version="1.0" encoding="UTF-8&quo…
安装CLI https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/2.1.1.RELEASE/spring-boot-cli-2.1.1.RELEASE-bin.zip 解压后即可使用,免安装.解压位置 F:\tool\java\spring-boot-cli-2.1.1.RELEASE-bin\spring-2.1.1.RELEASE 设置环境变量 PATH+=F:\tool\java\spring-bo…
推荐使用 Java-based configuration ,也可以使用xml we generally recommend that your primary source be a single @Configuration class. Usually the class that defines the main method is a good candidate as the primary @Configuration Importing Additional Configurat…
欢迎指导与讨论 : ) 前言 本文主要是笔者在React英文官网学习时整理的笔记.由于笔者水平有限,如有错误恳请指出 O(∩_∩)O 一 .Tutoial 篇 1 . React的组件类名的首字母必须是大写  var Comment = React.creatClass({..})  class Comment extends Component(){...} 2 . 我们需要往一个对象里传入一些方法,并把这个对象以参数的形式传到React.creatClass( )里.其中最重要的方法是ren…
1. 创建项目 在 MyEclipse 中创建 Web 项目 springDemo01,将 Spring 框架所需的 JAR 包复制到项目的 lib 目录中,并将添加到类路径下,添加后的项目如图 2. 创建 PersonDao 接口 在项目的 src 目录下创建一个名为 com.mengma.ioc 的包,然后在该包中创建一个名为 PersonDao 的接口,并在接口中添加一个 add() 方法,如下所示. package com.mengma.ioc; public interface Per…