统一管理jar包版本号
UTF-8
1.8
1.8
4.12
1.2.17
1.16.18
5.1.47
1.1.16
1.3.0
统一管理依赖
org.springframework.boot
spring-boot-dependencies
2.2.2.RELEASE
pom
import
org.springframework.cloud
spring-cloud-dependencies
Hoxton.SR1
pom
import
com.alibaba.cloud
spring-cloud-alibaba-dependencies
2.1.0.RELEASE
pom
import
mysql
mysql-connector-java
${mysql.version}
com.alibaba
druid
${druid.version}
org.projectlombok
lombok
${lombok.version}
log4j
log4j
${log4j.version}
com.baomidou
mybatis-plus-boot-starter
${mysql.version}
junit
junit
${junit.version}
test
完整pom
4.0.0
org.example
springcloud
1.0-SNAPSHOT
order-service
user-service
pom
Maven
http://maven.apache.org/
2001
website
scp://webhost.company.com/www/website
UTF-8
1.8
1.8
4.12
1.2.17
1.16.18
5.1.47
1.1.16
1.3.0
org.springframework.boot
spring-boot-dependencies
2.2.2.RELEASE
pom
import
org.springframework.cloud
spring-cloud-dependencies
Hoxton.SR1
pom
import
com.alibaba.cloud
spring-cloud-alibaba-dependencies
2.1.0.RELEASE
pom
import
mysql
mysql-connector-java
${mysql.version}
com.alibaba
druid
${druid.version}
org.projectlombok
lombok
${lombok.version}
log4j
log4j
${log4j.version}
com.baomidou
mybatis-plus-boot-starter
${mysql.version}
junit
junit
${junit.version}
test
maven-clean-plugin
3.1.0
maven-site-plugin
3.7.1
maven-project-info-reports-plugin
3.0.0
org.apache.maven.plugins
maven-site-plugin
en,fr
3.创建子Maven工程
在子pom中添加基本依赖 (srping boot项目)是不是可以不用版本号 因为父级项目以及有了约束
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-actuator
mysql
mysql-connector-java
在resources下创建application.yml
在yml中设置启动端口
server:
port: 8080
最后创建一个启动入口类(名字自拟)
@SpringBootApplication
public class OrderApplication {
public static void main(String[] args) {
SpringApplication.run(OrderApplication.class,args);
}
}
最后附上项目总体预览图
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)