Commit e6fda093 authored by 赵啸非's avatar 赵啸非

添加初始化数据库脚本

parent d2dc30ff
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/boot</directory>
<outputDirectory>boot</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/db</directory>
<outputDirectory>db</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<profiles.log.level>DEBUG</profiles.log.level> <profiles.log.level>DEBUG</profiles.log.level>
<skipDeploy>true</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile> <profile>
...@@ -57,6 +58,7 @@ ...@@ -57,6 +58,7 @@
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<profiles.log.level>DEBUG</profiles.log.level> <profiles.log.level>DEBUG</profiles.log.level>
<skipDeploy>true</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile> <profile>
...@@ -76,6 +78,7 @@ ...@@ -76,6 +78,7 @@
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<profiles.log.level>DEBUG</profiles.log.level> <profiles.log.level>DEBUG</profiles.log.level>
<skipDeploy>false</skipDeploy>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
...@@ -251,6 +254,31 @@ ...@@ -251,6 +254,31 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<skipAssembly>${skipDeploy}</skipAssembly>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>smart-base-platform</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>./assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>${project.parent.basedir}/dist/smart-base-platform</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
......
...@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)` ...@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)`
PROJECT_NAME="@project.artifactId@"; PROJECT_NAME="@project.artifactId@";
MAIN_CLASS="$PROJECT_NAME-@project.version@.jar"; MAIN_CLASS="$PROJECT_NAME-@project.version@.jar";
LOG_PATH="@profiles.log.path@/$PROJECT_NAME" LOG_PATH="@profiles.log.path@/$PROJECT_NAME"
GC_PATH=$LOG_PATH/$PORT"-gc.log" GC_PATH=$LOG_PATH/PROJECT_NAME"-gc.log"
HS_ERR_PATH=$LOG_PATH/$PORT"-hs_err.log" HS_ERR_PATH=$LOG_PATH/PROJECT_NAME"-hs_err.log"
HEAP_DUMP_PATH=$LOG_PATH/$PORT"-heap_dump.hprof" HEAP_DUMP_PATH=$LOG_PATH/PROJECT_NAME"-heap_dump.hprof"
TEMP_PATH=$LOG_PATH/temp/ TEMP_PATH=$LOG_PATH/temp/
SUCCESS=0 SUCCESS=0
FAIL=9 FAIL=9
......
...@@ -22,7 +22,8 @@ public class MessageProducer implements IMessageProduceService { ...@@ -22,7 +22,8 @@ public class MessageProducer implements IMessageProduceService {
private RabbitTemplate rabbitTemplate; private RabbitTemplate rabbitTemplate;
public void syncAccessSend(AccessLogPdu accessLogPdu) { public void syncAccessSend(AccessLogPdu accessLogPdu) {
rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, JSON.toJSONString(accessLogPdu)); //rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, JSON.toJSONString(accessLogPdu));
rabbitTemplate.convertAndSend(QueueKey.EXCHANGE, QueueKey.ACCESS_LOG_QUEUE, accessLogPdu);
} }
@Override @Override
......
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/boot</directory>
<outputDirectory>boot</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/db</directory>
<outputDirectory>db</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<skipDeploy>true</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile> <profile>
...@@ -51,12 +52,13 @@ ...@@ -51,12 +52,13 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<skipDeploy>true</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile> <profile>
<id>product</id> <id>product</id>
<properties> <properties>
<profiles.active>test</profiles.active> <profiles.active>product</profiles.active>
<profiles.server.port>17212</profiles.server.port> <profiles.server.port>17212</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type> <profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.kafka.brokers>192.168.0.251:9092</profiles.kafka.brokers> <profiles.kafka.brokers>192.168.0.251:9092</profiles.kafka.brokers>
...@@ -69,6 +71,7 @@ ...@@ -69,6 +71,7 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<skipDeploy>false</skipDeploy>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
...@@ -223,6 +226,31 @@ ...@@ -223,6 +226,31 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<skipAssembly>${skipDeploy}</skipAssembly>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>smart-portal-platform</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>./assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>${project.parent.basedir}/dist/smart-portal-platform</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
......
...@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)` ...@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)`
PROJECT_NAME="@project.artifactId@"; PROJECT_NAME="@project.artifactId@";
MAIN_CLASS="$PROJECT_NAME-@project.version@.jar"; MAIN_CLASS="$PROJECT_NAME-@project.version@.jar";
LOG_PATH="@profiles.log.path@/$PROJECT_NAME" LOG_PATH="@profiles.log.path@/$PROJECT_NAME"
GC_PATH=$LOG_PATH/$PORT"-gc.log" GC_PATH=$LOG_PATH/PROJECT_NAME"-gc.log"
HS_ERR_PATH=$LOG_PATH/$PORT"-hs_err.log" HS_ERR_PATH=$LOG_PATH/PROJECT_NAME"-hs_err.log"
HEAP_DUMP_PATH=$LOG_PATH/$PORT"-heap_dump.hprof" HEAP_DUMP_PATH=$LOG_PATH/PROJECT_NAME"-heap_dump.hprof"
TEMP_PATH=$LOG_PATH/temp/ TEMP_PATH=$LOG_PATH/temp/
SUCCESS=0 SUCCESS=0
FAIL=9 FAIL=9
......
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/boot</directory>
<outputDirectory>boot</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/dist/${project.artifactId}/db</directory>
<outputDirectory>db</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<skipDeploy>true</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile> <profile>
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<skipDeploy>true</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile> <profile>
...@@ -68,6 +70,7 @@ ...@@ -68,6 +70,7 @@
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/mortals/app/logs</profiles.log.path> <profiles.log.path>/mortals/app/logs</profiles.log.path>
<skipDeploy>false</skipDeploy>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
...@@ -189,6 +192,30 @@ ...@@ -189,6 +192,30 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<skipAssembly>${skipDeploy}</skipAssembly>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>smart-gateway</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>./assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>${project.parent.basedir}/dist/smart-gateway</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
...@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)` ...@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)`
PROJECT_NAME="@project.artifactId@"; PROJECT_NAME="@project.artifactId@";
MAIN_CLASS="$PROJECT_NAME-@project.version@.jar"; MAIN_CLASS="$PROJECT_NAME-@project.version@.jar";
LOG_PATH="@profiles.log.path@/$PROJECT_NAME" LOG_PATH="@profiles.log.path@/$PROJECT_NAME"
GC_PATH=$LOG_PATH/$PORT"-gc.log" GC_PATH=$LOG_PATH/PROJECT_NAME"-gc.log"
HS_ERR_PATH=$LOG_PATH/$PORT"-hs_err.log" HS_ERR_PATH=$LOG_PATH/PROJECT_NAME"-hs_err.log"
HEAP_DUMP_PATH=$LOG_PATH/$PORT"-heap_dump.hprof" HEAP_DUMP_PATH=$LOG_PATH/PROJECT_NAME"-heap_dump.hprof"
TEMP_PATH=$LOG_PATH/temp/ TEMP_PATH=$LOG_PATH/temp/
SUCCESS=0 SUCCESS=0
FAIL=9 FAIL=9
......
...@@ -129,10 +129,8 @@ public class AccessLogFilter implements GlobalFilter, Ordered { ...@@ -129,10 +129,8 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
builder.append(entry.getKey()).append("=").append(StringUtils.join(entry.getValue(), ",")); builder.append(entry.getKey()).append("=").append(StringUtils.join(entry.getValue(), ","));
} }
accessLog.setRequestData(builder.toString()); accessLog.setRequestData(builder.toString());
//获取响应体 //获取响应体
ServerHttpResponseDecorator decoratedResponse = recordResponseLog(exchange, accessLog); ServerHttpResponseDecorator decoratedResponse = recordResponseLog(exchange, accessLog);
return chain.filter(exchange.mutate().response(decoratedResponse).build()) return chain.filter(exchange.mutate().response(decoratedResponse).build())
.then(Mono.fromRunnable(() -> { .then(Mono.fromRunnable(() -> {
// 打印日志 发送 // 打印日志 发送
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment