Spring Boot    2019-07-25 21:51:22    1175    0    0

    首先简单说一下两个注解之前的区别。


@Configurationproperties@Value
功能批量注入配置文件中的属性每个属性单独注入
松散语法支持不支持
SpEL不支持支持
JSR303数据校验支持不支持
复杂类型封装支持不支持

首先说一下功能上面,@Configurationpr

Spring Boot    2019-07-24 00:00:48    372    0    0

    上面讲到了yaml来配置属性,也提到了properties,所以这里便用properties来配置属性。

其实和上面没有什么太大的不同,代码再来添加一遍,和前面的代码大同小异。

首先pom.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" 
Spring Boot    2019-07-23 23:47:29    1118    0    0

    既然开始学习Spring Boot,那么需要用到配置。在Spring Boot项目中,resources下有两个目录,static和templates。其中static用于存放静态资源,例如图片文件、js、css、html等等。templates用于存放模板引擎资源,例如FreeMarker、Velocity等等。

    然后在resources根目录下还有一个文件,applica

Spring Boot    2019-07-23 23:31:16    229    0    0

    Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。通过这种方式,Spring Boot致力于在蓬勃发展的快速应用开发领域(rapid application development)成为领导者。

首先将版本确定

    Maven版本:3.6

    JDK版本:1.8.0_202

    Spring Boot:2.1.6.RELEASE

接着就开始写入门程序

首先是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.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>cc.acme_me</groupId>
    <artifactId>SpringBootHelloWorld</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactI
2019-06-01 15:10:43    3205    0    0

因为服务器版本,最小安装,要查域名的时候竟然没有nslook命令

然后我查看自己的Ubuntu桌面版,能够有命令。

然后使用

dpkg -l|grep nslookup​

结果发现没出来结果,那这就郁闷了。

最后还是靠搜索引擎找到的答案

sudo apt-get install dnsutils​

实在dnsutils这个包中,而且这个包也包括了dig命令。

CKeditor CKeditor4 图片上传    2019-04-28 07:17:16    904    0    0

 1、首先引用ckeditor并且初始化,这里示例比较简单,也不加样式,版本为ckeditor4.11.4

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh">
<head>
 <title>CKeditor</title>
 <script src="${pageContext
3/5