feat(修复): Dockerfile文件
Signed-off-by: bunny <1319900154@qq.com>
This commit is contained in:
parent
7f08af15b3
commit
ad0bcfda9b
|
@ -31,8 +31,10 @@
|
|||
<module name="service-product-client" options="-parameters" />
|
||||
<module name="service-user" options="-parameters" />
|
||||
<module name="service-user-client" options="-parameters" />
|
||||
<module name="spzx-common" options="" />
|
||||
<module name="spzx-manager" options="-parameters" />
|
||||
<module name="spzx-model" options="-parameters" />
|
||||
<module name="spzx-parent-v2" options="" />
|
||||
<module name="spzx-server-gateway" options="-parameters" />
|
||||
<module name="spzx-service" options="" />
|
||||
<module name="spzx-service-client" options="" />
|
||||
|
|
|
@ -59,13 +59,11 @@ public class RedisConfiguration {
|
|||
log.info("RedisConfiguration===>解决cache(@Cacheable)把数据缓存到redis中的value是乱码问题");
|
||||
|
||||
StringRedisSerializer redisSerializer = new StringRedisSerializer();
|
||||
// json序列化
|
||||
Jackson2JsonRedisSerializer<Object> serializer = jsonRedisSerializer();
|
||||
// 配置序列化
|
||||
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig();
|
||||
RedisCacheConfiguration redisCacheConfiguration = config
|
||||
.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer))
|
||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(serializer));
|
||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jsonRedisSerializer()));
|
||||
|
||||
RedisCacheManager cacheManager = RedisCacheManager.builder(factory)
|
||||
.cacheDefaults(redisCacheConfiguration).build();
|
||||
|
|
|
@ -11,7 +11,7 @@ RUN echo "Asia/Shanghai" > /etc/timezone
|
|||
WORKDIR /home/bunny
|
||||
|
||||
# 复制jar包
|
||||
COPY target/sky-server-1.0-SNAPSHOT.jar /home/bunny/app.jar
|
||||
COPY target/*.jar /home/bunny/app.jar
|
||||
|
||||
#启动容器时的进程
|
||||
ENTRYPOINT ["java","-jar","/home/bunny/app.jar"]
|
||||
|
|
|
@ -65,4 +65,24 @@
|
|||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests> <!--默认关掉单元测试 -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -11,7 +11,7 @@ RUN echo "Asia/Shanghai" > /etc/timezone
|
|||
WORKDIR /home/bunny
|
||||
|
||||
# 复制jar包
|
||||
COPY target/sky-server-1.0-SNAPSHOT.jar /home/bunny/app.jar
|
||||
COPY target/*.jar /home/bunny/app.jar
|
||||
|
||||
#启动容器时的进程
|
||||
ENTRYPOINT ["java","-jar","/home/bunny/app.jar"]
|
||||
|
|
|
@ -12,6 +12,9 @@ spring:
|
|||
namespace: ${bunny.nacos.discovery.namespace}
|
||||
server-addr: ${bunny.nacos.server-addr}
|
||||
log-name: logs/${spring.application.name}
|
||||
sentinel:
|
||||
log:
|
||||
dir: logs/${spring.application.name}/sentinel
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
|
|
|
@ -11,7 +11,7 @@ RUN echo "Asia/Shanghai" > /etc/timezone
|
|||
WORKDIR /home/bunny
|
||||
|
||||
# 复制jar包
|
||||
COPY target/sky-server-1.0-SNAPSHOT.jar /home/bunny/app.jar
|
||||
COPY target/*.jar /home/bunny/app.jar
|
||||
|
||||
#启动容器时的进程
|
||||
ENTRYPOINT ["java","-jar","/home/bunny/app.jar"]
|
||||
|
|
|
@ -11,7 +11,7 @@ RUN echo "Asia/Shanghai" > /etc/timezone
|
|||
WORKDIR /home/bunny
|
||||
|
||||
# 复制jar包
|
||||
COPY target/sky-server-1.0-SNAPSHOT.jar /home/bunny/app.jar
|
||||
COPY target/*.jar /home/bunny/app.jar
|
||||
|
||||
#启动容器时的进程
|
||||
ENTRYPOINT ["java","-jar","/home/bunny/app.jar"]
|
||||
|
|
|
@ -11,7 +11,7 @@ RUN echo "Asia/Shanghai" > /etc/timezone
|
|||
WORKDIR /home/bunny
|
||||
|
||||
# 复制jar包
|
||||
COPY target/sky-server-1.0-SNAPSHOT.jar /home/bunny/app.jar
|
||||
COPY target/*.jar /home/bunny/app.jar
|
||||
|
||||
#启动容器时的进程
|
||||
ENTRYPOINT ["java","-jar","/home/bunny/app.jar"]
|
||||
|
|
Loading…
Reference in New Issue