4.0.0org.springframework.bootspring-boot-starter-parent2.2.1.RELEASEcom.istio.appistio-app0.0.1-SNAPSHOTistio-apppomIstio Demo project for Spring Boot1.8app-apiapp-orderapp-price
...
...
上述的POM文件即为三个微服务的父POM文件,有几点值得注意的地方:
父POM文件的打包方式为pom,因为父POM文件仅仅为了管理子模块
父POM中通过dependencyManagement来统一管理子模块依赖的版本
父POM中通过modules来声明有哪些子模块
1.2.1 Maven的子模块
以api这个微服务为例,它的POM文件如下面这样:
4.0.0com.istio.appistio-app0.0.1-SNAPSHOT../app-api0.0.1-SNAPSHOTapp-apiDemo project for Spring Boot
...
...
# 命令中使用的是这个插件的全称,其中包括groupId和artifactId
E:\project\spring\mavenbase>mvn org.apache.maven.plugins:maven-help-plugin:help
...
[INFO] --- maven-help-plugin:3.2.0:help (default-cli) @ maven-base
...
# 这个插件有8个目标,仅列出部分
This plugin has 8 goals:
help:describe
Displays a list of the attributes for a Maven Plugin and/or goals (aka Mojo -
Maven plain Old Java Object).
help:effective-pom
Displays the effective POM as an XML for this build, with the active profiles
factored in, or a specified artifact. If verbose, a comment is added to each
XML element describing the origin of the line.
help:help
Display help information on maven-help-plugin.
Call mvn help:help -Ddetail=true -Dgoal= to display parameter
details.
获取maven-help-plugin插件名称的简称
# 使用上面的describe目标查看这个插件的详情
E:\project\spring\mavenbase>mvn org.apache.maven.plugins:maven-help-plugin:describe -Dplugin=org.apache.maven.plugins:maven-help-plugin
...
[INFO] org.apache.maven.plugins:maven-help-plugin:3.2.0
Name: Apache Maven Help Plugin
...
Group Id: org.apache.maven.plugins
Artifact Id: maven-help-plugin
Version: 3.2.0
# 可以看出`maven-help-plugin`的简称是help,
Goal Prefix: help
查看maven-clean-plugin插件(简称:clean)的目标
# 命令中使用的是插件的简称
E:\my-project\spring\mavenbase>mvn help:describe -Dplugin=clean
...
Name: Maven Clean Plugin
...
Group Id: org.apache.maven.plugins
Artifact Id: maven-clean-plugin
Version: 2.5
# 这个插件的简称确实是clean
Goal Prefix: clean
# 这个插件有两个目标
This plugin has 2 goals:
clean:clean
Description: Goal which cleans the build.
This attempts to clean a project's working directory of the files that were
generated at build-time. By default, it discovers and deletes the
directories configured in project.build.directory,
project.build.outputDirectory, project.build.testOutputDirectory, and
project.reporting.outputDirectory.
Files outside the default may also be included in the deletion by
configuring the filesets tag.
clean:help
Description: Display help information on maven-clean-plugin.
Call
mvn clean:help -Ddetail=true -Dgoal=
to display parameter details.
查看maven-clean-plugin插件的clean目标详情
E:\project\spring\mavenbase>mvn help:describe -Dplugin=clean -Dgoal=clean -Ddetail
...
[INFO] Mojo: 'clean:clean'
clean:clean
Description: ...
# 这个目标开放了这些参数可设置,这也是我们在POM文件里通过可以指定的参数来源
Available parameters:
excludeDefaultDirectories (Default: false)
User property: clean.excludeDefaultDirectories
...
failOnError (Default: true)
User property: maven.clean.failOnError
...
filesets
The list of file sets to delete, in addition to the default directories.
...
followSymLinks (Default: false)
User property: clean.followSymLinks
...
retryOnError (Default: true)
User property: maven.clean.retryOnError
...
skip (Default: false)
User property: clean.skip
...
verbose
User property: clean.verbose
...
打包方式:java工程——jarweb项目-war父工程-pom继承实现步骤:1.建立父工程:父工程的打包方式为pom2.在父工程的pom.xml中编写依赖:3.子类:给当前工程继承一个父工程:①加入父工程坐标gav②当前工程的Pom.xml到父工程的Pom.xml之间的相对路径 org.lanqiao.maven B 0.0.1-SNA
系统中统计数据,由于调用统计过程,执行时间超过了weblogic设置的时间,提示如下错误:
统计数据出错!
原因:The transaction is no longer active - status: 'Rolling Back. [Reason=weblogic.transaction.internal
Totally five patchs committed to erlang otp, just small patchs.
IMO, erlang really is a interesting programming language, I really like its concurrency feature.
but the functional programming style
两个步骤:
1.用w命令找到要踢出的用户,比如下面:
[root@localhost ~]# w
18:16:55 up 39 days, 8:27, 3 users, load average: 0.03, 0.03, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
package edu.xidian.graph;
class MyStack {
private final int SIZE = 20;
private int[] st;
private int top;
public MyStack() {
st = new int[SIZE];
top = -1;
}
public void push(i