SpringCloud基础之父工程创建

  • 开发环境jdk1.8
  • IDE eclipse Neon
  • SpringCloud版本Dalston.SR1
  • SpringBoot版本1.5.9.RELEASE
    创建一个Maven Project
    打包的方式选为pom
    pom文件中的内容如下
<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.0modelVersion>
	<groupId>com.thc.springcloudgroupId>
	<artifactId>mircroservicecloudartifactId>
	<version>0.0.1-SNAPSHOTversion>
	<packaging>pompackaging>

	<properties>
		<project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
		<maven.compiler.source>1.8maven.compiler.source>
		<maven.compiler.target>1.8maven.compiler.target>
		<junit.version>4.12junit.version>
		<log4j.version>1.2.17log4j.version>
		<lombok.version>1.16.18lombok.version>
	properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloudgroupId>
				<artifactId>spring-cloud-dependenciesartifactId>
				<version>Dalston.SR1version>
				<type>pomtype>
				<scope>importscope>
			dependency>
			<dependency>
				<groupId>org.springframework.bootgroupId>
				<artifactId>spring-boot-dependenciesartifactId>
				<version>1.5.9.RELEASEversion>
				<type>pomtype>
				<scope>importscope>
			dependency>
			<dependency>
				<groupId>mysqlgroupId>
				<artifactId>mysql-connector-javaartifactId>
				<version>5.0.4version>
			dependency>
			<dependency>
				<groupId>com.alibabagroupId>
				<artifactId>druidartifactId>
				<version>1.0.31version>
			dependency>
			<dependency>
				<groupId>org.mybatis.spring.bootgroupId>
				<artifactId>mybatis-spring-boot-starterartifactId>
				<version>1.3.0version>
			dependency>
			<dependency>
				<groupId>ch.qos.logbackgroupId>
				<artifactId>logback-coreartifactId>
				<version>1.2.3version>
			dependency>
			<dependency>
				<groupId>junitgroupId>
				<artifactId>junitartifactId>
				<version>${junit.version}version>
				<scope>testscope>
			dependency>
			<dependency>
				<groupId>log4jgroupId>
				<artifactId>log4jartifactId>
				<version>${log4j.version}version>
			dependency>
		dependencies>
	dependencyManagement>

	<build>
		<finalName>microservicecloudfinalName>
		<resources>
			<resource>
				<directory>src/main/resourcesdirectory>
				<filtering>truefiltering>
			resource>
		resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.pluginsgroupId>
				<artifactId>maven-resources-pluginartifactId>
				<configuration>
					<delimiters>
						<delimit>$delimit>
					delimiters>
				configuration>
			plugin>
		plugins>
	build>
project>

建立完成后效果如下
SpringCloud基础之父工程创建_第1张图片

你可能感兴趣的:(SpringCloud,Spring,Cloud系列文章)