美文网首页我爱编程
SpringBoot - 各种有用的官方资料(持续更新)

SpringBoot - 各种有用的官方资料(持续更新)

作者: 爱蛇 | 来源:发表于2018-04-08 10:39 被阅读0次

    各种Starter:

    https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/reference/htmlsingle/#using-boot-starter

    各种依赖Jar包版本:

    https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/reference/htmlsingle/#executable-jar-alternatives

    application.properties配置文件可以配置项:

    https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/reference/htmlsingle/#common-application-properties
    其中有配置项可用于切换不同的环境(开发环境、测试环境、生产环境):

    # PROFILES
    spring.profiles.active= # Comma-separated list of active profiles. Can be overridden by a command line switch.
    spring.profiles.include= # Unconditionally activate the specified comma-separated list of profiles (or list of profiles if using YAML).
    

    Spring Boot OAuth2

    可用于 单点登陆(SSO),当然可以可用于生成token
    https://spring.io/guides/tutorials/spring-boot-oauth2/

    SpringBoot 应用程序构建组(Spring Initializer)

    官网地址: https://start.spring.io/
    可以选择需要的第三方组件,例如mybatis,redis,等等,然后会生成一个压缩包让你下载,包里包含着一个已经准备好所需要maven依赖的pom.xml文件:

    <?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>com.example</groupId>
        <artifactId>demo</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>jar</packaging>
    
        <name>demo</name>
        <description>Demo project for Spring Boot</description>
    
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.0.1.RELEASE</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>
    
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
            <java.version>1.8</java.version>
        </properties>
    
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-redis</artifactId>
            </dependency>
            <dependency>
                <groupId>org.mybatis.spring.boot</groupId>
                <artifactId>mybatis-spring-boot-starter</artifactId>
                <version>1.3.2</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    
    
    </project>
    

    除了可以直接网站上生成,还可以通过idea进行生成,更方便一些:


    1.png 2.png 3.png

    相关文章

      网友评论

        本文标题:SpringBoot - 各种有用的官方资料(持续更新)

        本文链接:https://www.haomeiwen.com/subject/gtdphftx.html