PHP笔记网

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2018-11-09 11:45:19  修改时间:2024-11-20 12:59:01  分类:07.Java基础  编辑

Maven(在线)仓库Apache Commons 类库Hutool类库

 

<?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>jianbao.blog</groupId>
    <artifactId>jianbao-blog</artifactId>
    <version>1.0.0</version>

    <name>jianbao-blog</name>
    <url></url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
    <!-- 使用阿里 maven 库 -->
    <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
    <repositories>
        <repository>
            <id>ali-maven</id>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- junit 单元测试 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Freemarker 模板引擎 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.31</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- slf4j-log4j 日志框架 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.32</version>
            <!--<scope>test</scope>-->
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Hutool 工具包(官网:https://hutool.cn/) -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>4.5.10</version>
        </dependency>        

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Netty TCP通信库 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.39.Final</version>
        </dependency>
       
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- HttpServlet -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- 数据库连接池Druid,JDBC API(依赖下面的MySQL驱动)-->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.1.12</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- MySQL Driver -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.23</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Apache Commons:Lang3 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.8.1</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Apache Commons:BeanUtils -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.3</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Apache Commons:HttpClient -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.6</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- Json库 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
        </dependency>

        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <!-- 二维码生成库 -->
        <!--++++++++++++++++++++++++++++++++++++++++++++++++++++-->
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>core</artifactId>
            <version>3.3.3</version>
        </dependency>
        
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>javase</artifactId>
            <version>3.3.3</version>
        </dependency>
        

    </dependencies>

    <build>
        <finalName>jianbao-blog</finalName>

        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
            <plugins>
                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

 


SpringBoot 2.1.7 官方 给的 入门级Demo配置:

<?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>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.7.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.jianbao</groupId>
	<artifactId>springboot</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>springboot</name>
	<description>Demo project for Spring Boot</description>

	<properties>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</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>