提交 9c727658 编写于 作者: 鲸落和鲨掉's avatar 鲸落和鲨掉

添加Docker脚本文件,并上线测试

上级 bd509e13
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/bigmarket-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-api/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-app/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-app/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-domain/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-domain/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-infrastructure/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-infrastructure/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-trigger/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-trigger/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-types/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/bigmarket-types/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xfg-frame-archetype-lite-api/src/main/java" charset="UTF-8" />
......
......@@ -5,6 +5,7 @@
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/xfg-frame-archetype-lite-app/pom.xml" />
</list>
</option>
</component>
......
......@@ -22,6 +22,12 @@
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>cn.bugstack</groupId>
<artifactId>bigmarket-types</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
......
package cn.bugstack.trigger.api;
import cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO;
import cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO;
import cn.bugstack.trigger.api.dto.RaffleRequestDTO;
import cn.bugstack.trigger.api.dto.RaffleResponseDTO;
import cn.bugstack.types.model.Response;
import java.util.List;
public interface IRaffleService {
/**
* 策略装配接口
*
* @param strategyId 策略ID
* @return 装配结果
*/
Response<Boolean> strategyArmory(Long strategyId);
/**
* 查询抽奖奖品列表配置
*
* @param requestDTO 抽奖奖品列表查询请求参数
* @return 奖品列表数据
*/
Response<List<RaffleAwardListResponseDTO>> queryRaffleAwardList(RaffleAwardListRequestDTO requestDTO);
/**
* 随机抽奖接口
*
* @param requestDTO 请求参数
* @return 抽奖结果
*/
Response<RaffleResponseDTO> randomRaffle(RaffleRequestDTO requestDTO);
}
package cn.bugstack.trigger.api.dto;
import lombok.Data;
/**
* @ClassName: RaffleAwardListRequestDTO
* @Description: 抽奖奖品列表,请求对象
* @Author: zhaoyongfeng
* @Date: 2024/11/22 16:35
*/
@Data
public class RaffleAwardListRequestDTO {
// 抽奖策略ID
private Long strategyId;
}
package cn.bugstack.trigger.api.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @ClassName: RaffleAwardListRequestDTO
* @Description: 抽奖奖品列表,应答对象
* @Author: zhaoyongfeng
* @Date: 2024/11/22 16:35
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RaffleAwardListResponseDTO {
// 奖品ID
private Integer awardId;
// 奖品标题
private String awardTitle;
// 奖品副标题【抽奖1次后解锁】
private String awardSubtitle;
// 排序编号
private Integer sort;
}
package cn.bugstack.trigger.api.dto;
import lombok.Data;
/**
* @ClassName: RaffleAwardListRequestDTO
* @Description: 抽奖奖品列表,应答对象
* @Author: zhaoyongfeng
* @Date: 2024/11/22 16:35
*/
@Data
public class RaffleRequestDTO {
// 抽奖策略ID
private Long strategyId;
}
package cn.bugstack.trigger.api.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @ClassName: RaffleAwardListRequestDTO
* @Description: 抽奖奖品列表,应答对象
* @Author: zhaoyongfeng
* @Date: 2024/11/22 16:35
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RaffleResponseDTO {
// 奖品ID
private Integer awardId;
// 排序编号【策略奖品配置的奖品顺序编号】
private Integer awardIndex;
}
......@@ -2,7 +2,7 @@
FROM openjdk:8-jre-slim
# 作者
MAINTAINER xiaofuge
MAINTAINER zyf
# 配置
ENV PARAMS=""
......@@ -12,6 +12,6 @@ ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 添加应用
ADD target/xfg-frame-archetype-lite-app.jar /xfg-frame-archetype-lite-app.jar
ADD target/big-market-app.jar /big-market-app.jar
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /xfg-frame-archetype-lite-app.jar $PARAMS"]
\ No newline at end of file
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /big-market-app.jar $PARAMS"]
# 普通镜像构建,随系统版本构建 amd/arm
docker build -t system/xfg-frame-archetype-lite-app:1.0-SNAPSHOT -f ./Dockerfile .
docker build -t zyf/big-market-app:1.0 -f ./Dockerfile .
# 兼容 amd、arm 构建镜像
# docker buildx build --load --platform liunx/amd64,linux/arm64 -t xiaofuge/xfg-frame-archetype-app:1.0 -f ./Dockerfile . --push
\ No newline at end of file
# docker buildx build --load --platform liunx/amd64,linux/arm64 -t xiaofuge/xfg-frame-archetype-app:1.0 -f ./Dockerfile . --push
24-11-21.15:10:59.570 [main ] WARN GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
24-11-21.15:10:59.615 [main ] ERROR LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' that could not be found.
Action:
Consider defining a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' in your configuration.
24-11-21.15:10:59.618 [main ] ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@63475ace] to prepare test instance [cn.bugstack.test.domain.RaffleStrategyTest@46383a78]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
... 27 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1801)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1357)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
24-11-21.15:12:01.523 [main ] WARN GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
24-11-21.15:12:01.565 [main ] ERROR LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' that could not be found.
Action:
Consider defining a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' in your configuration.
24-11-21.15:12:01.568 [main ] ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@bccb269] to prepare test instance [cn.bugstack.test.domain.RaffleStrategyTest@6af91cc8]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
... 27 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1801)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1357)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
24-11-21.00:18:10.323 [main ] INFO LogicTreeTest - Starting LogicTreeTest using Java 1.8.0_412 on zhaoyongfeng with PID 14764 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.00:18:10.325 [main ] INFO LogicTreeTest - The following 1 profile is active: "dev"
24-11-21.00:18:11.606 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.00:18:11.613 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.00:18:11.702 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 58 ms. Found 0 Redis repository interfaces.
24-11-21.00:18:14.424 [main ] INFO Version - Redisson 3.23.4
24-11-21.00:18:15.978 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.00:18:15.993 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.00:18:18.535 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.00:18:18.624 [main ] INFO LogicTreeTest - Started LogicTreeTest in 8.941 seconds (JVM running for 10.3)
24-11-21.00:18:19.032 [main ] INFO DecisionTreeEngine - 决策树引擎【决策树规则;增加dall-e-3画图模型】treeId:100000001 node:rule_lock code:0000
24-11-21.00:18:48.457 [main ] INFO LogicTreeTest - Starting LogicTreeTest using Java 1.8.0_412 on zhaoyongfeng with PID 26972 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.00:18:48.458 [main ] INFO LogicTreeTest - The following 1 profile is active: "dev"
24-11-21.00:18:49.573 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.00:18:49.577 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.00:18:49.653 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 59 ms. Found 0 Redis repository interfaces.
24-11-21.00:18:52.313 [main ] INFO Version - Redisson 3.23.4
24-11-21.00:18:53.827 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.00:18:53.846 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.00:18:56.644 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.00:18:56.749 [main ] INFO LogicTreeTest - Started LogicTreeTest in 8.929 seconds (JVM running for 10.662)
24-11-21.00:19:11.859 [main ] INFO DecisionTreeEngine - 决策树引擎【决策树规则;增加dall-e-3画图模型】treeId:100000001 node:rule_lock code:0000
24-11-21.09:41:04.472 [main ] INFO LogicTreeTest - Starting LogicTreeTest using Java 1.8.0_412 on zhaoyongfeng with PID 10876 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.09:41:04.474 [main ] INFO LogicTreeTest - The following 1 profile is active: "dev"
24-11-21.09:41:05.643 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.09:41:05.647 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.09:41:05.727 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 61 ms. Found 0 Redis repository interfaces.
24-11-21.09:41:09.395 [main ] INFO Version - Redisson 3.23.4
24-11-21.09:41:10.935 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.09:41:10.949 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.09:41:13.487 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.09:41:13.582 [main ] INFO LogicTreeTest - Started LogicTreeTest in 9.788 seconds (JVM running for 11.282)
24-11-21.09:41:14.015 [main ] INFO DecisionTreeEngine - 决策树引擎【决策树规则;增加dall-e-3画图模型】treeId:100000001 node:rule_lock code:0000
24-11-21.09:52:15.429 [main ] INFO LogicTreeTest - Starting LogicTreeTest using Java 1.8.0_412 on zhaoyongfeng with PID 14180 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.09:52:15.430 [main ] INFO LogicTreeTest - The following 1 profile is active: "dev"
24-11-21.09:52:16.505 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.09:52:16.509 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.09:52:16.583 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 57 ms. Found 0 Redis repository interfaces.
24-11-21.09:52:19.227 [main ] INFO Version - Redisson 3.23.4
24-11-21.09:52:20.760 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.09:52:20.776 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.09:52:23.366 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.09:52:23.460 [main ] INFO LogicTreeTest - Started LogicTreeTest in 8.558 seconds (JVM running for 10.027)
24-11-21.09:55:22.238 [main ] INFO DecisionTreeEngine - 决策树引擎【决策树规则;增加dall-e-3画图模型】treeId:100000001 node:rule_lock code:0000
24-11-21.15:10:57.359 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 3676 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.15:10:57.360 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.15:10:58.501 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.15:10:58.506 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.15:10:58.587 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 58 ms. Found 0 Redis repository interfaces.
24-11-21.15:10:59.570 [main ] WARN GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
24-11-21.15:10:59.581 [main ] INFO ConditionEvaluationReportLoggingListener -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
24-11-21.15:10:59.615 [main ] ERROR LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' that could not be found.
Action:
Consider defining a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' in your configuration.
24-11-21.15:10:59.618 [main ] ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@63475ace] to prepare test instance [cn.bugstack.test.domain.RaffleStrategyTest@46383a78]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
... 27 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1801)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1357)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
24-11-21.15:11:59.314 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 20840 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.15:11:59.316 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.15:12:00.478 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.15:12:00.483 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.15:12:00.566 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 57 ms. Found 0 Redis repository interfaces.
24-11-21.15:12:01.523 [main ] WARN GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
24-11-21.15:12:01.533 [main ] INFO ConditionEvaluationReportLoggingListener -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
24-11-21.15:12:01.565 [main ] ERROR LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' that could not be found.
Action:
Consider defining a bean of type 'cn.bugstack.domain.strategy.IRaffleStock' in your configuration.
24-11-21.15:12:01.568 [main ] ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@bccb269] to prepare test instance [cn.bugstack.test.domain.RaffleStrategyTest@6af91cc8]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateAwardStockJob': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
... 27 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.bugstack.domain.strategy.IRaffleStock' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1801)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1357)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
24-11-21.15:51:28.375 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 19740 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.15:51:28.376 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.15:51:29.451 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.15:51:29.455 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.15:51:29.533 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 56 ms. Found 0 Redis repository interfaces.
24-11-21.15:51:32.317 [main ] INFO Version - Redisson 3.23.4
24-11-21.15:51:33.893 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.15:51:33.917 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.15:51:36.350 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.15:51:36.443 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.57 seconds (JVM running for 9.746)
24-11-21.15:51:36.940 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.15:51:37.299 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.15:51:37.496 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.15:51:37.509 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:01:12.923 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 21148 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:01:12.924 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:01:14.041 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:01:14.046 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:01:14.137 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 68 ms. Found 0 Redis repository interfaces.
24-11-21.16:01:17.000 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:01:18.601 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:01:18.616 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:01:21.293 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:01:21.394 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 9.084 seconds (JVM running for 10.621)
24-11-21.16:01:36.889 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:01:45.227 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:01:52.241 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:05:51.238 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 24376 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:05:51.239 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:05:52.311 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:05:52.315 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:05:52.400 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 67 ms. Found 0 Redis repository interfaces.
24-11-21.16:05:55.357 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:05:56.976 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:05:56.993 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:05:59.728 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:05:59.837 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 9.125 seconds (JVM running for 10.313)
24-11-21.16:06:00.035 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:07:07.304 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 23096 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:07:07.306 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:07:08.427 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:07:08.431 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:07:08.511 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 58 ms. Found 0 Redis repository interfaces.
24-11-21.16:07:11.194 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:07:12.720 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:07:12.734 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:07:15.319 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:07:15.425 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.654 seconds (JVM running for 9.779)
24-11-21.16:09:48.148 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 20476 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:09:48.150 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:09:49.329 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:09:49.334 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:09:49.417 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 64 ms. Found 0 Redis repository interfaces.
24-11-21.16:09:52.226 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:09:53.840 [redisson-netty-2-5] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:09:53.855 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:09:56.386 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:09:56.479 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 9.017 seconds (JVM running for 10.299)
24-11-21.16:12:28.292 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 20704 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:12:28.293 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:12:29.463 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:12:29.468 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:12:29.556 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 71 ms. Found 0 Redis repository interfaces.
24-11-21.16:12:32.367 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:12:33.993 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:12:34.007 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:12:36.548 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:12:36.641 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.944 seconds (JVM running for 10.307)
24-11-21.16:12:37.068 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:12:37.374 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:12:37.566 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:12:37.574 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:14:06.813 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 14460 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:14:06.814 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:14:07.910 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:14:07.915 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:14:07.999 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 63 ms. Found 0 Redis repository interfaces.
24-11-21.16:14:10.744 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:14:12.399 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:14:12.420 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:14:15.145 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:14:15.234 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.936 seconds (JVM running for 10.126)
24-11-21.16:14:15.712 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:14:15.881 [main ] INFO RaffleStrategyTest - 测试结果:null
24-11-21.16:15:52.287 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 21100 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:15:52.288 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:15:53.427 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:15:53.433 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:15:53.519 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 66 ms. Found 0 Redis repository interfaces.
24-11-21.16:15:56.306 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:15:57.876 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:15:57.894 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:16:00.706 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:16:00.812 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 9.085 seconds (JVM running for 10.295)
24-11-21.16:16:01.353 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:16:01.517 [main ] INFO RaffleStrategyTest - 测试结果:null
24-11-21.16:16:56.248 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 23912 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:16:56.249 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:16:57.442 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:16:57.446 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:16:57.529 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 65 ms. Found 0 Redis repository interfaces.
24-11-21.16:17:00.244 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:17:01.808 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:17:01.822 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:17:04.146 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:17:04.230 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.596 seconds (JVM running for 9.928)
24-11-21.16:17:04.713 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:17:04.721 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:17:04.722 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:17:04.743 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:17:05.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:17:05.041 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:17:05.109 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:17:05.113 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:22:01.755 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 9992 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:22:01.757 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:22:02.949 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:22:02.954 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:22:03.037 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 60 ms. Found 0 Redis repository interfaces.
24-11-21.16:22:05.934 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:22:07.495 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:22:07.509 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:22:10.242 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:22:10.337 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 9.166 seconds (JVM running for 11.038)
24-11-21.16:22:15.931 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:22:24.312 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:22:24.312 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:22:25.272 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:22:25.798 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:22:25.801 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:22:25.869 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:22:26.921 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:22:30.054 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:22:31.027 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:22:31.037 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:24:27.106 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 17456 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:24:27.107 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:24:28.196 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:24:28.202 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:24:28.308 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 76 ms. Found 0 Redis repository interfaces.
24-11-21.16:24:31.041 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:24:32.581 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:24:32.594 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:24:35.050 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:24:35.165 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.59 seconds (JVM running for 9.79)
24-11-21.16:24:35.657 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:24:35.665 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:24:35.667 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:24:35.690 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:24:36.006 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:24:36.068 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:24:36.071 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:27:11.550 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 17076 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:27:11.552 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:27:12.626 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:27:12.630 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:27:12.706 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 55 ms. Found 0 Redis repository interfaces.
24-11-21.16:27:15.368 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:27:16.931 [redisson-netty-2-5] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:27:16.947 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:27:19.331 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:27:19.425 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.379 seconds (JVM running for 9.509)
24-11-21.16:27:19.907 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:27:19.919 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:27:19.920 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:27:19.948 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:27:20.014 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.16:27:20.246 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:27:20.308 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:27:20.311 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:36:17.800 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 20948 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:36:17.801 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:36:18.901 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:36:18.905 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:36:18.991 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 65 ms. Found 0 Redis repository interfaces.
24-11-21.16:36:21.684 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:36:23.377 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:36:23.392 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:36:25.820 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:36:25.908 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.623 seconds (JVM running for 9.763)
24-11-21.16:36:26.373 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:36:26.380 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:36:26.382 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:36:26.406 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:36:26.695 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:36:26.775 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:36:26.778 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:37:01.019 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 20712 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:37:01.020 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:37:02.185 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:37:02.189 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:37:02.273 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 65 ms. Found 0 Redis repository interfaces.
24-11-21.16:37:04.955 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:37:06.502 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:37:06.516 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:37:09.015 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:37:09.106 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.602 seconds (JVM running for 9.82)
24-11-21.16:37:09.584 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:37:09.595 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:37:09.596 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:37:09.618 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:37:09.907 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:37:09.987 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:37:09.991 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:38:17.390 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 22668 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:38:17.391 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:38:18.607 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:38:18.617 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:38:18.690 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 56 ms. Found 0 Redis repository interfaces.
24-11-21.16:38:21.418 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:38:23.001 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:38:23.025 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:38:25.562 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:38:25.698 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.856 seconds (JVM running for 10.024)
24-11-21.16:38:26.202 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:38:26.210 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:38:26.211 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:38:26.234 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:38:26.527 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:38:26.626 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:38:26.631 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:38:47.023 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 11392 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:38:47.024 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:38:48.200 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:38:48.208 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:38:48.308 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 69 ms. Found 0 Redis repository interfaces.
24-11-21.16:38:51.086 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:38:52.638 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:38:52.653 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:38:55.192 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:38:55.300 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.863 seconds (JVM running for 10.055)
24-11-21.16:38:55.826 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:38:55.838 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:38:55.839 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:38:55.863 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:38:56.173 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:38:56.255 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:38:56.258 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.16:42:23.144 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 23392 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.16:42:23.146 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.16:42:24.489 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.16:42:24.502 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.16:42:24.673 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 128 ms. Found 0 Redis repository interfaces.
24-11-21.16:42:28.163 [main ] INFO Version - Redisson 3.23.4
24-11-21.16:42:29.763 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:42:29.778 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.16:42:32.490 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.16:42:32.588 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 10.068 seconds (JVM running for 11.342)
24-11-21.16:42:33.113 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.16:42:33.121 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.16:42:33.123 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.16:42:33.146 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.16:42:33.440 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.16:42:33.531 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.16:42:33.535 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.17:10:23.732 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 17616 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.17:10:23.733 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.17:10:24.893 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.17:10:24.897 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.17:10:24.987 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 73 ms. Found 0 Redis repository interfaces.
24-11-21.17:10:27.640 [main ] INFO Version - Redisson 3.23.4
24-11-21.17:10:29.184 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.17:10:29.198 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.17:10:31.675 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.17:10:31.771 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.602 seconds (JVM running for 9.839)
24-11-21.17:10:32.261 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.17:10:32.268 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.17:10:32.269 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.17:10:32.290 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.17:10:32.582 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.17:10:32.645 [main ] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.647 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_lock code:0000
24-11-21.17:10:32.648 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.651 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.674 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_stock code:0001
24-11-21.17:10:32.674 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:102 ruleValue:101:1,100
24-11-21.17:10:32.676 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:101 awardRuleValue:1,100
24-11-21.17:10:32.676 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_luck_award code:0001
24-11-21.17:10:32.676 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 xiaofuge 100006 101 1,100
24-11-21.17:10:32.869 [main ] INFO RaffleStrategyTest - 请求参数:{"strategyId":100006,"userId":"xiaofuge"}
24-11-21.17:10:32.872 [main ] INFO RaffleStrategyTest - 测试结果:{"awardConfig":"1,100","awardId":101}
24-11-21.17:10:32.878 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.17:10:32.878 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.17:10:32.882 [main ] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.882 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_lock code:0000
24-11-21.17:10:32.882 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.884 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.886 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_stock code:0001
24-11-21.17:10:32.886 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:102 ruleValue:101:1,100
24-11-21.17:10:32.886 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:101 awardRuleValue:1,100
24-11-21.17:10:32.886 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_luck_award code:0001
24-11-21.17:10:32.886 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 xiaofuge 100006 101 1,100
24-11-21.17:10:32.886 [main ] INFO RaffleStrategyTest - 请求参数:{"strategyId":100006,"userId":"xiaofuge"}
24-11-21.17:10:32.886 [main ] INFO RaffleStrategyTest - 测试结果:{"awardConfig":"1,100","awardId":101}
24-11-21.17:10:32.889 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.17:10:32.890 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.17:10:32.892 [main ] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.892 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_lock code:0000
24-11-21.17:10:32.892 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.894 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:10:32.895 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_stock code:0001
24-11-21.17:10:32.895 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:102 ruleValue:101:1,100
24-11-21.17:10:32.896 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:101 awardRuleValue:1,100
24-11-21.17:10:32.896 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_luck_award code:0001
24-11-21.17:10:32.896 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 xiaofuge 100006 101 1,100
24-11-21.17:10:32.896 [main ] INFO RaffleStrategyTest - 请求参数:{"strategyId":100006,"userId":"xiaofuge"}
24-11-21.17:10:32.896 [main ] INFO RaffleStrategyTest - 测试结果:{"awardConfig":"1,100","awardId":101}
24-11-21.17:10:35.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.17:10:40.002 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.17:10:40.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存 strategyId:100006 awardId:102
24-11-21.17:10:45.007 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.17:10:45.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存 strategyId:100006 awardId:102
24-11-21.17:10:50.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.17:10:50.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存 strategyId:100006 awardId:102
24-11-21.17:10:53.627 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.17:10:53.641 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-21.17:12:39.816 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 10100 (started by zhaoyongfeng in C:\Users\31126\Desktop\study\xfg-frame-archetype-lite\xfg-frame-archetype-lite-app)
24-11-21.17:12:39.817 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-21.17:12:40.921 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-21.17:12:40.925 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-21.17:12:41.012 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 71 ms. Found 0 Redis repository interfaces.
24-11-21.17:12:43.680 [main ] INFO Version - Redisson 3.23.4
24-11-21.17:12:45.228 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.17:12:45.243 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-21.17:12:47.687 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-21.17:12:47.782 [main ] INFO RaffleStrategyTest - Started RaffleStrategyTest in 8.484 seconds (JVM running for 9.661)
24-11-21.17:12:48.241 [main ] INFO RaffleStrategyTest - 测试结果:true
24-11-21.17:12:48.248 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.17:12:48.250 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.17:12:48.270 [main ] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-21.17:12:48.558 [main ] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-21.17:12:48.613 [main ] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.614 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_lock code:0000
24-11-21.17:12:48.615 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.619 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.643 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_stock code:0001
24-11-21.17:12:48.643 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:102 ruleValue:101:1,100
24-11-21.17:12:48.645 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:101 awardRuleValue:1,100
24-11-21.17:12:48.645 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_luck_award code:0001
24-11-21.17:12:48.645 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 xiaofuge 100006 101 1,100
24-11-21.17:12:48.830 [main ] INFO RaffleStrategyTest - 请求参数:{"strategyId":100006,"userId":"xiaofuge"}
24-11-21.17:12:48.833 [main ] INFO RaffleStrategyTest - 测试结果:{"awardConfig":"1,100","awardId":101}
24-11-21.17:12:48.837 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.17:12:48.837 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.17:12:48.841 [main ] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.841 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_lock code:0000
24-11-21.17:12:48.841 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.843 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.845 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_stock code:0001
24-11-21.17:12:48.845 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:102 ruleValue:101:1,100
24-11-21.17:12:48.845 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:101 awardRuleValue:1,100
24-11-21.17:12:48.845 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_luck_award code:0001
24-11-21.17:12:48.845 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 xiaofuge 100006 101 1,100
24-11-21.17:12:48.845 [main ] INFO RaffleStrategyTest - 请求参数:{"strategyId":100006,"userId":"xiaofuge"}
24-11-21.17:12:48.845 [main ] INFO RaffleStrategyTest - 测试结果:{"awardConfig":"1,100","awardId":101}
24-11-21.17:12:48.848 [main ] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: xiaofuge strategyId: 100006 ruleModel: rule_default awardId: 102
24-11-21.17:12:48.848 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 xiaofuge 100006 102 rule_default
24-11-21.17:12:48.851 [main ] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.851 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_lock code:0000
24-11-21.17:12:48.851 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.854 [main ] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:xiaofuge strategyId:100006 awardId:102
24-11-21.17:12:48.855 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_stock code:0001
24-11-21.17:12:48.855 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:102 ruleValue:101:1,100
24-11-21.17:12:48.855 [main ] INFO RuleLuckAwardLogicTreeNode - 规则过滤-兜底奖品 userId:xiaofuge strategyId:100006 awardId:101 awardRuleValue:1,100
24-11-21.17:12:48.855 [main ] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock node:rule_luck_award code:0001
24-11-21.17:12:48.856 [main ] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 xiaofuge 100006 101 1,100
24-11-21.17:12:48.856 [main ] INFO RaffleStrategyTest - 请求参数:{"strategyId":100006,"userId":"xiaofuge"}
24-11-21.17:12:48.856 [main ] INFO RaffleStrategyTest - 测试结果:{"awardConfig":"1,100","awardId":101}
24-11-21.17:12:50.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.17:12:55.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-21.17:12:55.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存 strategyId:100006 awardId:102
24-11-21.17:12:56.427 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-21.17:12:56.439 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-22.17:43:57.319 [main ] WARN GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'raffleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
24-11-22.17:43:57.371 [main ] ERROR SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'raffleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 61 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 73 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 89 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 105 common frames omitted
Caused by: org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$0(ConnectionPool.java:132)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.connection.pool.ConnectionPool.promiseFailure(ConnectionPool.java:294)
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$6(ConnectionPool.java:253)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.client.RedisClient$1$2.run(RedisClient.java:257)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:925)
at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:913)
... 11 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
24-11-22.17:43:57.375 [main ] ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@17f7cd29] to prepare test instance [cn.bugstack.test.domain.RaffleStrategyTest@6cbb175]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'raffleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
... 27 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 61 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 73 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 89 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 105 common frames omitted
Caused by: org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$0(ConnectionPool.java:132)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.connection.pool.ConnectionPool.promiseFailure(ConnectionPool.java:294)
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$6(ConnectionPool.java:253)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.client.RedisClient$1$2.run(RedisClient.java:257)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:925)
at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:913)
... 11 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
24-11-22.17:43:40.514 [main ] INFO RaffleStrategyTest - Starting RaffleStrategyTest using Java 1.8.0_412 on zhaoyongfeng with PID 18552 (started by zhaoyongfeng in C:\Users\31126\Desktop\bigmarket-lite\bigmarket-app)
24-11-22.17:43:40.515 [main ] INFO RaffleStrategyTest - The following 1 profile is active: "dev"
24-11-22.17:43:41.714 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-22.17:43:41.720 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-22.17:43:41.825 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 83 ms. Found 0 Redis repository interfaces.
24-11-22.17:43:44.588 [main ] INFO Version - Redisson 3.23.4
24-11-22.17:43:57.319 [main ] WARN GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'raffleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
24-11-22.17:43:57.343 [main ] INFO ConditionEvaluationReportLoggingListener -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
24-11-22.17:43:57.371 [main ] ERROR SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'raffleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 61 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 73 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 89 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 105 common frames omitted
Caused by: org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$0(ConnectionPool.java:132)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.connection.pool.ConnectionPool.promiseFailure(ConnectionPool.java:294)
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$6(ConnectionPool.java:253)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.client.RedisClient$1$2.run(RedisClient.java:257)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:925)
at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:913)
... 11 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
24-11-22.17:43:57.375 [main ] ERROR TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@17f7cd29] to prepare test instance [cn.bugstack.test.domain.RaffleStrategyTest@6cbb175]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:248)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'raffleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:136)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:141)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:90)
... 27 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRaffleStrategy' defined in file [C:\Users\31126\Desktop\bigmarket-lite\bigmarket-domain\target\classes\cn\bugstack\domain\strategy\service\raffle\DefaultRaffleStrategy.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 43 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'strategyRepository': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 61 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:544)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 73 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonClient' defined in class path resource [cn/bugstack/config/RedisClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:520)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
... 89 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method 'redissonClient' threw exception; nested exception is org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 105 common frames omitted
Caused by: org.redisson.client.RedisConnectionException: Unable to connect to Redis server: 127.0.0.1/127.0.0.1:6379
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$0(ConnectionPool.java:132)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.connection.pool.ConnectionPool.promiseFailure(ConnectionPool.java:294)
at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$6(ConnectionPool.java:253)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.redisson.client.RedisClient$1$2.run(RedisClient.java:257)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:925)
at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:913)
... 11 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 127.0.0.1/127.0.0.1:6379
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
......@@ -95,7 +95,7 @@
</dependencies>
<build>
<finalName>xfg-frame-archetype-lite-app</finalName>
<finalName>big-market-app</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
......
server:
port: 8091
tomcat:
threads:
max: 200 # 设定处理客户请求的线程的最大数目,决定了服务器可以同时响应客户请求的数,默认200
min-spare: 50 # 初始化线程数,最小空闲线程数,默认是10
accept-count: 10 # 等待队列长度
# 应用配置
app:
config:
# 版本,方便通过接口版本升级
api-version: v1
# 跨域,开发阶段可以设置为 * 不限制
cross-origin: '*'
# 线程池配置
thread:
......
......@@ -23,10 +23,12 @@
from strategy_award
limit 10
</select>
<select id="queryStrategyAwardListByStrategyId" parameterType="java.lang.Long" resultMap="dataMap">
select strategy_id, award_id, award_count, award_count_surplus, award_rate
select strategy_id, award_id, award_title, award_subtitle, award_count, award_count_surplus, award_rate, sort
from strategy_award
where strategy_id = #{strategy_id}
where strategy_id = #{strategyId}
order by sort asc
</select>
<select id="queryStrategyAwardRuleModels" parameterType="cn.bugstack.infrastructure.persistent.po.StrategyAward" resultType="java.lang.String">
......@@ -40,6 +42,13 @@
where strategy_id = #{strategyId} and award_id = #{awardId} and award_count_surplus > 0
</update>
<select id="queryStrategyAward" parameterType="cn.bugstack.infrastructure.persistent.po.StrategyAward" resultMap="dataMap">
select strategy_id, award_id, award_title, award_subtitle, award_count, award_count_surplus, award_rate, rule_models, sort
from strategy_award
where strategy_id = #{strategyId} and award_id = #{awardId}
</select>
</mapper>
......@@ -43,10 +43,15 @@
<groupId>cn.bugstack</groupId>
<artifactId>bigmarket-types</artifactId>
</dependency>
<dependency>
<groupId>cn.bugstack</groupId>
<artifactId>bigmarket-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>xfg-frame-archetype-lite-domain</finalName>
<finalName>big-market-domain</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -2,6 +2,7 @@ package cn.bugstack.domain.strategy;
import cn.bugstack.domain.strategy.model.entity.RaffleAwardEntity;
import cn.bugstack.domain.strategy.model.entity.RaffleFactorEntity;
import cn.bugstack.domain.strategy.model.entity.StrategyAwardEntity;
import cn.bugstack.domain.strategy.repository.IStrategyRepository;
import cn.bugstack.domain.strategy.service.armory.IStrategyDispatch;
import cn.bugstack.domain.strategy.service.rule.chain.factory.DefaultChainFactory;
......@@ -18,7 +19,7 @@ import org.apache.commons.lang3.StringUtils;
* @Date: 2024/11/17 16:14
*/
@Slf4j
public abstract class AbstractRaffleStrategy implements IRaffleStrategy, IRaffleStock {
public abstract class AbstractRaffleStrategy implements IRaffleStrategy {
// 策略仓储服务 -> domain层像一个大厨,仓储层提供米面粮油
protected IStrategyRepository repository;
......@@ -36,7 +37,6 @@ public abstract class AbstractRaffleStrategy implements IRaffleStrategy, IRaffle
this.defaultTreeFactory = defaultTreeFactory;
}
@Override
public RaffleAwardEntity performRaffle(RaffleFactorEntity raffleFactorEntity) {
// 1. 参数校验
......@@ -50,9 +50,8 @@ public abstract class AbstractRaffleStrategy implements IRaffleStrategy, IRaffle
DefaultChainFactory.StrategyAwardVO chainStrategyAwardVO = raffleLogicChain(userId, strategyId);
log.info("抽奖策略计算-责任链 {} {} {} {}", userId, strategyId, chainStrategyAwardVO.getAwardId(), chainStrategyAwardVO.getLogicModel());
if (!DefaultChainFactory.LogicModel.RULE_DEFAULT.getCode().equals(chainStrategyAwardVO.getLogicModel())) {
return RaffleAwardEntity.builder()
.awardId(chainStrategyAwardVO.getAwardId())
.build();
// TODO awardConfig 暂时为空。黑名单指定积分奖品,后续需要在库表中配置上对应的1积分值,并获取到。
return buildRaffleAwardEntity(strategyId, chainStrategyAwardVO.getAwardId(), null);
}
// 3. 规则树抽奖过滤【奖品ID,会根据抽奖次数判断、库存判断、兜底兜里返回最终的可获得奖品信息】
......@@ -60,15 +59,18 @@ public abstract class AbstractRaffleStrategy implements IRaffleStrategy, IRaffle
log.info("抽奖策略计算-规则树 {} {} {} {}", userId, strategyId, treeStrategyAwardVO.getAwardId(), treeStrategyAwardVO.getAwardRuleValue());
// 4. 返回抽奖结果
return buildRaffleAwardEntity(strategyId, treeStrategyAwardVO.getAwardId(), treeStrategyAwardVO.getAwardRuleValue());
}
private RaffleAwardEntity buildRaffleAwardEntity(Long strategyId, Integer awardId, String awardConfig) {
StrategyAwardEntity strategyAward = repository.queryStrategyAwardEntity(strategyId, awardId);
return RaffleAwardEntity.builder()
.awardId(treeStrategyAwardVO.getAwardId())
.awardConfig(treeStrategyAwardVO.getAwardRuleValue())
.awardId(awardId)
.awardConfig(awardConfig)
.sort(strategyAward.getSort())
.build();
}
/**
* 抽奖计算,责任链抽象方法
*
......@@ -89,3 +91,4 @@ public abstract class AbstractRaffleStrategy implements IRaffleStrategy, IRaffle
public abstract DefaultTreeFactory.StrategyAwardVO raffleLogicTree(String userId, Long strategyId, Integer awardId);
}
package cn.bugstack.domain.strategy;
import cn.bugstack.domain.strategy.model.entity.StrategyAwardEntity;
import java.util.List;
public interface IRaffleAward {
/**
* 根据策略ID查询抽奖奖品列表配置
*
* @param strategyId 策略ID
* @return 奖品列表
*/
List<StrategyAwardEntity> queryRaffleStrategyAwardList(Long strategyId);
}
......@@ -16,15 +16,11 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@Builder
public class RaffleAwardEntity {
/** 策略ID */
private Long strategyId;
/** 奖品ID */
private Integer awardId;
/** 奖品对接标识 - 每一个都是一个对应的发奖策略 */
private String awardKey;
/** 奖品配置信息 */
private String awardConfig;
/** 奖品内容描述 */
private String awardDesc;
/** 奖品顺序号 */
private Integer sort;
}
......@@ -22,11 +22,18 @@ public class StrategyAwardEntity {
private Long strategyId;
/** 抽奖奖品ID - 内部流转使用 */
private Integer awardId;
/** 抽奖奖品标题 */
private String awardTitle;
/** 抽奖奖品副标题 */
private String awardSubtitle;
/** 奖品库存总量 */
private Integer awardCount;
/** 奖品库存剩余 */
private Integer awardCountSurplus;
/** 奖品中奖概率 */
private BigDecimal awardRate;
/** 排序 */
private Integer sort;
}
......@@ -75,4 +75,5 @@ public interface IStrategyRepository {
*/
void updateStrategyAwardStock(Long strategyId, Integer awardId);
StrategyAwardEntity queryStrategyAwardEntity(Long strategyId, Integer awardId);
}
package cn.bugstack.domain.strategy.service.raffle;
import cn.bugstack.domain.strategy.AbstractRaffleStrategy;
import cn.bugstack.domain.strategy.IRaffleAward;
import cn.bugstack.domain.strategy.IRaffleStock;
import cn.bugstack.domain.strategy.model.entity.StrategyAwardEntity;
import cn.bugstack.domain.strategy.model.valobj.RuleTreeVO;
import cn.bugstack.domain.strategy.model.valobj.StrategyAwardRuleModelVO;
import cn.bugstack.domain.strategy.model.valobj.StrategyAwardStockKeyVO;
......@@ -13,6 +16,8 @@ import cn.bugstack.domain.strategy.service.rule.tree.factory.engine.IDecisionTre
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName: DefaultRaffleStrategy
* @Description: 默认的抽奖策略实现
......@@ -21,7 +26,7 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@Service
public class DefaultRaffleStrategy extends AbstractRaffleStrategy {
public class DefaultRaffleStrategy extends AbstractRaffleStrategy implements IRaffleStock, IRaffleAward {
public DefaultRaffleStrategy(IStrategyRepository repository, IStrategyDispatch strategyDispatch, DefaultChainFactory defaultChainFactory, DefaultTreeFactory defaultTreeFactory) {
super(repository, strategyDispatch, defaultChainFactory, defaultTreeFactory);
......@@ -33,7 +38,6 @@ public class DefaultRaffleStrategy extends AbstractRaffleStrategy {
return logicChain.logic(userId, strategyId);
}
@Override
public DefaultTreeFactory.StrategyAwardVO raffleLogicTree(String userId, Long strategyId, Integer awardId) {
StrategyAwardRuleModelVO strategyAwardRuleModelVO = repository.queryStrategyAwardRuleModelVO(strategyId, awardId);
......@@ -48,7 +52,6 @@ public class DefaultRaffleStrategy extends AbstractRaffleStrategy {
return treeEngine.process(userId, strategyId, awardId);
}
@Override
public StrategyAwardStockKeyVO takeQueueValue() throws InterruptedException {
return repository.takeQueueValue();
......@@ -59,5 +62,11 @@ public class DefaultRaffleStrategy extends AbstractRaffleStrategy {
repository.updateStrategyAwardStock(strategyId, awardId);
}
@Override
public List<StrategyAwardEntity> queryRaffleStrategyAwardList(Long strategyId) {
return repository.queryStrategyAwardList(strategyId);
}
}
......@@ -66,7 +66,7 @@ public class DecisionTreeEngine implements IDecisionTreeEngine {
return nodeLine.getRuleNodeTo();
}
}
throw new RuntimeException("决策树引擎,nextNode 计算失败,未找到可执行节点!");
return null;
}
public boolean decisionLogic(String matterValue, RuleTreeNodeLineVO nodeLine) {
......
......@@ -30,7 +30,7 @@
</dependencies>
<build>
<finalName>xfg-frame-archetype-lite-infrastructure</finalName>
<finalName>big-market-infrastructure</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -14,4 +14,6 @@ public interface IStrategyAwardDao {
String queryStrategyAwardRuleModels(StrategyAward strategyAward);
void updateStrategyAwardStock(StrategyAward strategyAward);
StrategyAward queryStrategyAward(StrategyAward strategyAwardReq);
}
......@@ -10,6 +10,7 @@ import cn.bugstack.infrastructure.persistent.dao.*;
import cn.bugstack.infrastructure.persistent.po.*;
import cn.bugstack.infrastructure.persistent.redis.IRedisService;
import cn.bugstack.types.common.Constants;
import cn.bugstack.types.exception.AppException;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RBlockingQueue;
import org.redisson.api.RDelayedQueue;
......@@ -22,6 +23,8 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static cn.bugstack.types.enums.ResponseCode.UN_ASSEMBLED_STRATEGY_ARMORY;
/**
* @ClassName: StrategyRepository
......@@ -52,7 +55,7 @@ public class StrategyRepository implements IStrategyRepository {
@Override
public List<StrategyAwardEntity> queryStrategyAwardList(Long strategyId) {
// 优先从缓存获取
String cacheKey = Constants.RedisKey.STRATEGY_AWARD_KEY + strategyId;
String cacheKey = Constants.RedisKey.STRATEGY_AWARD_LIST_KEY + strategyId;
List<StrategyAwardEntity> strategyAwardEntities = redisService.getValue(cacheKey);
if (null != strategyAwardEntities && !strategyAwardEntities.isEmpty()) return strategyAwardEntities;
// 从库中获取数据
......@@ -62,9 +65,12 @@ public class StrategyRepository implements IStrategyRepository {
StrategyAwardEntity strategyAwardEntity = StrategyAwardEntity.builder()
.strategyId(strategyAward.getStrategyId())
.awardId(strategyAward.getAwardId())
.awardTitle(strategyAward.getAwardTitle())
.awardSubtitle(strategyAward.getAwardSubtitle())
.awardCount(strategyAward.getAwardCount())
.awardCountSurplus(strategyAward.getAwardCountSurplus())
.awardRate(strategyAward.getAwardRate())
.sort(strategyAward.getSort())
.build();
strategyAwardEntities.add(strategyAwardEntity);
}
......@@ -93,9 +99,14 @@ public class StrategyRepository implements IStrategyRepository {
@Override
public int getRateRange(String key) {
return redisService.getValue(Constants.RedisKey.STRATEGY_RATE_RANGE_KEY + key);
String cacheKey = Constants.RedisKey.STRATEGY_RATE_RANGE_KEY + key;
if (!redisService.isExists(cacheKey)) {
throw new AppException(UN_ASSEMBLED_STRATEGY_ARMORY.getCode(), cacheKey + Constants.COLON + UN_ASSEMBLED_STRATEGY_ARMORY.getInfo());
}
return redisService.getValue(cacheKey);
}
@Override
public StrategyEntity queryStrategyEntityByStrategyId(Long strategyId) {
// 优先从缓存获取
......@@ -258,6 +269,35 @@ public class StrategyRepository implements IStrategyRepository {
}
@Override
public StrategyAwardEntity queryStrategyAwardEntity(Long strategyId, Integer awardId) {
// 优先从缓存获取
String cacheKey = Constants.RedisKey.STRATEGY_AWARD_KEY + strategyId + Constants.UNDERLINE + awardId;
StrategyAwardEntity strategyAwardEntity = redisService.getValue(cacheKey);
if (null != strategyAwardEntity) return strategyAwardEntity;
// 查询数据
StrategyAward strategyAwardReq = new StrategyAward();
strategyAwardReq.setStrategyId(strategyId);
strategyAwardReq.setAwardId(awardId);
StrategyAward strategyAwardRes = strategyAwardDao.queryStrategyAward(strategyAwardReq);
// 转换数据
strategyAwardEntity = StrategyAwardEntity.builder()
.strategyId(strategyAwardRes.getStrategyId())
.awardId(strategyAwardRes.getAwardId())
.awardTitle(strategyAwardRes.getAwardTitle())
.awardSubtitle(strategyAwardRes.getAwardSubtitle())
.awardCount(strategyAwardRes.getAwardCount())
.awardCountSurplus(strategyAwardRes.getAwardCountSurplus())
.awardRate(strategyAwardRes.getAwardRate())
.sort(strategyAwardRes.getSort())
.build();
// 缓存结果
redisService.setValue(cacheKey, strategyAwardEntity);
// 返回数据
return strategyAwardEntity;
}
}
......
......@@ -36,10 +36,17 @@
<groupId>cn.bugstack</groupId>
<artifactId>bigmarket-domain</artifactId>
</dependency>
<dependency>
<groupId>cn.bugstack</groupId>
<artifactId>bigmarket-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>xfg-frame-archetype-lite-trigger</finalName>
<finalName>big-market-trigger</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
package cn.bugstack.trigger.http;
import cn.bugstack.domain.strategy.model.entity.RaffleAwardEntity;
import cn.bugstack.domain.strategy.model.entity.RaffleFactorEntity;
import cn.bugstack.domain.strategy.model.entity.StrategyAwardEntity;
import cn.bugstack.domain.strategy.IRaffleAward;
import cn.bugstack.domain.strategy.IRaffleStrategy;
import cn.bugstack.domain.strategy.service.armory.IStrategyArmory;
import cn.bugstack.trigger.api.IRaffleService;
import cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO;
import cn.bugstack.trigger.api.dto.RaffleRequestDTO;
import cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO;
import cn.bugstack.trigger.api.dto.RaffleResponseDTO;
import cn.bugstack.types.enums.ResponseCode;
import cn.bugstack.types.exception.AppException;
import cn.bugstack.types.model.Response;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName: RaffleController
* @Description: 营销抽奖服务
* @Author: zhaoyongfeng
* @Date: 2024/11/22 16:46
*/
@Slf4j
@RestController()
@CrossOrigin("${app.config.cross-origin}")
@RequestMapping("/api/${app.config.api-version}/raffle/")
public class RaffleController implements IRaffleService {
@Resource
private IRaffleAward raffleAward;
@Resource
private IRaffleStrategy raffleStrategy;
@Resource
private IStrategyArmory strategyArmory;
/**
* 策略装配,将策略信息装配到缓存中
* <a href="http://localhost:8091/api/v1/raffle/strategy_armory">/api/v1/raffle/strategy_armory</a>
*
* @param strategyId 策略ID
* @return 装配结果
*/
@RequestMapping(value = "strategy_armory", method = RequestMethod.GET)
@Override
public Response<Boolean> strategyArmory(@RequestParam Long strategyId) {
try {
log.info("抽奖策略装配开始 strategyId:{}", strategyId);
boolean armoryStatus = strategyArmory.assembleLotteryStrategy(strategyId);
Response<Boolean> response = Response.<Boolean>builder()
.code(ResponseCode.SUCCESS.getCode())
.info(ResponseCode.SUCCESS.getInfo())
.data(armoryStatus)
.build();
log.info("抽奖策略装配完成 strategyId:{} response: {}", strategyId, JSON.toJSONString(response));
return response;
} catch (Exception e) {
log.error("抽奖策略装配失败 strategyId:{}", strategyId, e);
return Response.<Boolean>builder()
.code(ResponseCode.UN_ERROR.getCode())
.info(ResponseCode.UN_ERROR.getInfo())
.build();
}
}
/**
* 查询奖品列表
* <a href="http://localhost:8091/api/v1/raffle/query_raffle_award_list">/api/v1/raffle/query_raffle_award_list</a>
* 请求参数 raw json
*
* @param requestDTO {"strategyId":1000001}
* @return 奖品列表
*/
@RequestMapping(value = "query_raffle_award_list", method = RequestMethod.POST)
@Override
public Response<List<RaffleAwardListResponseDTO>> queryRaffleAwardList(@RequestBody RaffleAwardListRequestDTO requestDTO) {
try {
log.info("查询抽奖奖品列表配开始 strategyId:{}", requestDTO.getStrategyId());
// 查询奖品配置
List<StrategyAwardEntity> strategyAwardEntities = raffleAward.queryRaffleStrategyAwardList(requestDTO.getStrategyId());
List<RaffleAwardListResponseDTO> raffleAwardListResponseDTOS = new ArrayList<>(strategyAwardEntities.size());
for (StrategyAwardEntity strategyAward : strategyAwardEntities) {
raffleAwardListResponseDTOS.add(RaffleAwardListResponseDTO.builder()
.awardId(strategyAward.getAwardId())
.awardTitle(strategyAward.getAwardTitle())
.awardSubtitle(strategyAward.getAwardSubtitle())
.sort(strategyAward.getSort())
.build());
}
Response<List<RaffleAwardListResponseDTO>> response = Response.<List<RaffleAwardListResponseDTO>>builder()
.code(ResponseCode.SUCCESS.getCode())
.info(ResponseCode.SUCCESS.getInfo())
.data(raffleAwardListResponseDTOS)
.build();
log.info("查询抽奖奖品列表配置完成 strategyId:{} response: {}", requestDTO.getStrategyId(), JSON.toJSONString(response));
// 返回结果
return response;
} catch (Exception e) {
log.error("查询抽奖奖品列表配置失败 strategyId:{}", requestDTO.getStrategyId(), e);
return Response.<List<RaffleAwardListResponseDTO>>builder()
.code(ResponseCode.UN_ERROR.getCode())
.info(ResponseCode.UN_ERROR.getInfo())
.build();
}
}
/**
* 随机抽奖接口
* <a href="http://localhost:8091/api/v1/raffle/random_raffle">/api/v1/raffle/random_raffle</a>
*
* @param requestDTO 请求参数 {"strategyId":1000001}
* @return 抽奖结果
*/
@RequestMapping(value = "random_raffle", method = RequestMethod.POST)
@Override
public Response<RaffleResponseDTO> randomRaffle(@RequestBody RaffleRequestDTO requestDTO) {
try {
log.info("随机抽奖开始 strategyId: {}", requestDTO.getStrategyId());
// 调用抽奖接口
RaffleAwardEntity raffleAwardEntity = raffleStrategy.performRaffle(RaffleFactorEntity.builder()
.userId("system")
.strategyId(requestDTO.getStrategyId())
.build());
// 封装返回结果
Response<RaffleResponseDTO> response = Response.<RaffleResponseDTO>builder()
.code(ResponseCode.SUCCESS.getCode())
.info(ResponseCode.SUCCESS.getInfo())
.data(RaffleResponseDTO.builder()
.awardId(raffleAwardEntity.getAwardId())
.awardIndex(raffleAwardEntity.getSort())
.build())
.build();
log.info("随机抽奖完成 strategyId: {} response: {}", requestDTO.getStrategyId(), JSON.toJSONString(response));
return response;
} catch (AppException e) {
log.error("随机抽奖失败 strategyId:{} {}", requestDTO.getStrategyId(), e.getInfo());
return Response.<RaffleResponseDTO>builder()
.code(e.getCode())
.info(e.getInfo())
.build();
} catch (Exception e) {
log.error("随机抽奖失败 strategyId:{}", requestDTO.getStrategyId(), e);
return Response.<RaffleResponseDTO>builder()
.code(ResponseCode.UN_ERROR.getCode())
.info(ResponseCode.UN_ERROR.getInfo())
.build();
}
}
}
......@@ -11,10 +11,10 @@ public class Constants {
public static class RedisKey {
public static String STRATEGY_KEY = "big_market_strategy_key_";
public static String STRATEGY_AWARD_KEY = "big_market_strategy_award_key_";
public static String STRATEGY_AWARD_LIST_KEY = "big_market_strategy_award_list_key_";
public static String STRATEGY_RATE_TABLE_KEY = "big_market_strategy_rate_table_key_";
public static String STRATEGY_RATE_RANGE_KEY = "big_market_strategy_rate_range_key_";
public static String RULE_TREE_VO_KEY = "rule_tree_vo_key_";
public static String STRATEGY_AWARD_COUNT_KEY = "strategy_award_count_key_";
public static String STRATEGY_AWARD_COUNT_QUERY_KEY = "strategy_award_count_query_key";
......
......@@ -9,14 +9,17 @@ import lombok.NoArgsConstructor;
@Getter
public enum ResponseCode {
SUCCESS("0000", "成功"),
UN_ERROR("0001", "未知失败"),
SUCCESS("0000", "调用成功"),
UN_ERROR("0001", "调用失败"),
ILLEGAL_PARAMETER("0002", "非法参数"),
STRATEGY_RULE_WEIGHT_IS_NULL("ERR_BIZ_001", "业务异常,策略规则中 rule_weight 权重规则已适用但未配置"),
UN_ASSEMBLED_STRATEGY_ARMORY("ERR_BIZ_002", "抽奖策略配置未装配,请通过IStrategyArmory完成装配"),
;
private String code;
private String info;
}
package cn.bugstack.api.response;
package cn.bugstack.types.model;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -7,14 +7,18 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @ClassName: Response
* @Description:
* @Author: zhaoyongfeng
* @Date: 2024/11/22 16:44
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Response<T> implements Serializable {
private static final long serialVersionUID = 7000723935764546321L;
private String code;
private String info;
private T data;
......
24-11-23.17:01:56.015 [http-nio-8091-exec-1] WARN DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public cn.bugstack.types.model.Response<java.util.List<cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO>> cn.bugstack.trigger.http.RaffleController.queryRaffleAwardList(cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO)]
24-11-23.17:03:39.359 [http-nio-8091-exec-6] WARN DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public cn.bugstack.types.model.Response<java.util.List<cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO>> cn.bugstack.trigger.http.RaffleController.queryRaffleAwardList(cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO)]
24-11-23.17:03:53.266 [http-nio-8091-exec-7] WARN DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public cn.bugstack.types.model.Response<java.util.List<cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO>> cn.bugstack.trigger.http.RaffleController.queryRaffleAwardList(cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO)]
24-11-23.17:01:40.281 [main ] INFO Application - Starting Application using Java 1.8.0_412 on zhaoyongfeng with PID 24820 (C:\Users\31126\Desktop\bigmarket-lite\bigmarket-app\target\classes started by zhaoyongfeng in C:\Users\31126\Desktop\bigmarket-lite)
24-11-23.17:01:40.283 [main ] INFO Application - The following 1 profile is active: "dev"
24-11-23.17:01:41.341 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-23.17:01:41.344 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-23.17:01:41.413 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 54 ms. Found 0 Redis repository interfaces.
24-11-23.17:01:42.059 [main ] INFO TomcatWebServer - Tomcat initialized with port(s): 8091 (http)
24-11-23.17:01:42.070 [main ] INFO Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8091"]
24-11-23.17:01:42.071 [main ] INFO StandardService - Starting service [Tomcat]
24-11-23.17:01:42.071 [main ] INFO StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.75]
24-11-23.17:01:42.280 [main ] INFO [/] - Initializing Spring embedded WebApplicationContext
24-11-23.17:01:42.280 [main ] INFO ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1955 ms
24-11-23.17:01:42.829 [main ] INFO Version - Redisson 3.23.4
24-11-23.17:01:44.241 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-23.17:01:44.253 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-23.17:01:45.043 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-23.17:01:45.069 [main ] INFO Http11NioProtocol - Starting ProtocolHandler ["http-nio-8091"]
24-11-23.17:01:45.082 [main ] INFO TomcatWebServer - Tomcat started on port(s): 8091 (http) with context path ''
24-11-23.17:01:45.098 [main ] INFO Application - Started Application in 5.338 seconds (JVM running for 7.407)
24-11-23.17:01:46.600 [RMI TCP Connection(2)-192.168.157.1] INFO [/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
24-11-23.17:01:46.601 [RMI TCP Connection(2)-192.168.157.1] INFO DispatcherServlet - Initializing Servlet 'dispatcherServlet'
24-11-23.17:01:46.603 [RMI TCP Connection(2)-192.168.157.1] INFO DispatcherServlet - Completed initialization in 2 ms
24-11-23.17:01:48.852 [RMI TCP Connection(4)-192.168.157.1] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-23.17:01:49.127 [RMI TCP Connection(4)-192.168.157.1] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-23.17:01:50.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:01:55.015 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:01:56.015 [http-nio-8091-exec-1] WARN DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public cn.bugstack.types.model.Response<java.util.List<cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO>> cn.bugstack.trigger.http.RaffleController.queryRaffleAwardList(cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO)]
24-11-23.17:02:00.007 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:05.001 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:10.007 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:15.016 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:20.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:25.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:30.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:30.039 [http-nio-8091-exec-2] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:02:30.233 [http-nio-8091-exec-2] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:02:35.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:40.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:45.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:50.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:02:55.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:00.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:05.001 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:10.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:15.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:15.125 [http-nio-8091-exec-4] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:100006
24-11-23.17:03:15.134 [http-nio-8091-exec-4] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:100006 response: {"code":"0000","data":[{"awardId":101,"awardTitle":"随机积分","sort":1},{"awardId":102,"awardTitle":"7等奖","sort":2},{"awardId":103,"awardTitle":"6等奖","sort":3},{"awardId":104,"awardTitle":"5等奖","sort":4},{"awardId":105,"awardTitle":"4等奖","sort":5},{"awardId":106,"awardSubtitle":"抽奖1次后解锁","awardTitle":"3等奖","sort":6},{"awardId":107,"awardSubtitle":"抽奖1次后解锁","awardTitle":"2等奖","sort":7},{"awardId":108,"awardSubtitle":"抽奖2次后解锁","awardTitle":"1等奖","sort":8}],"info":"调用成功"}
24-11-23.17:03:20.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:25.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:30.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:35.010 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:39.359 [http-nio-8091-exec-6] WARN DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public cn.bugstack.types.model.Response<java.util.List<cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO>> cn.bugstack.trigger.http.RaffleController.queryRaffleAwardList(cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO)]
24-11-23.17:03:40.012 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:45.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:50.002 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:03:53.266 [http-nio-8091-exec-7] WARN DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public cn.bugstack.types.model.Response<java.util.List<cn.bugstack.trigger.api.dto.RaffleAwardListResponseDTO>> cn.bugstack.trigger.http.RaffleController.queryRaffleAwardList(cn.bugstack.trigger.api.dto.RaffleAwardListRequestDTO)]
24-11-23.17:03:55.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:00.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:05.012 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:10.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:15.015 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:20.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:25.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:30.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:35.011 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:40.002 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:45.014 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:45.705 [http-nio-8091-exec-12] INFO RaffleController - 随机抽奖开始 strategyId: 100006
24-11-23.17:04:45.714 [http-nio-8091-exec-12] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: system strategyId: 100006 ruleModel: rule_default awardId: 108
24-11-23.17:04:45.715 [http-nio-8091-exec-12] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 system 100006 108 rule_default
24-11-23.17:04:45.793 [http-nio-8091-exec-12] INFO RuleLockLogicTreeNode - 规则过滤-次数锁 userId:system strategyId:100006 awardId:108
24-11-23.17:04:45.794 [http-nio-8091-exec-12] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock_2 node:rule_lock code:0000
24-11-23.17:04:45.795 [http-nio-8091-exec-12] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:system strategyId:100006 awardId:108
24-11-23.17:04:45.799 [http-nio-8091-exec-12] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:system strategyId:100006 awardId:108
24-11-23.17:04:45.820 [http-nio-8091-exec-12] INFO DecisionTreeEngine - 决策树引擎【规则树】treeId:tree_lock_2 node:rule_stock code:0001
24-11-23.17:04:45.820 [http-nio-8091-exec-12] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 system 100006 108 null
24-11-23.17:04:45.833 [http-nio-8091-exec-12] INFO RaffleController - 随机抽奖完成 strategyId: 100006 response: {"code":"0000","data":{"awardId":108,"awardIndex":8},"info":"调用成功"}
24-11-23.17:04:50.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:04:50.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存 strategyId:100006 awardId:108
24-11-23.17:04:55.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:00.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:05.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:10.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:15.014 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:20.015 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:25.015 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:05:26.940 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown initiated...
24-11-23.17:05:26.952 [SpringApplicationShutdownHook] INFO HikariDataSource - HikariPool-1 - Shutdown completed.
24-11-23.17:13:00.216 [main ] INFO Application - Starting Application using Java 1.8.0_412 on zhaoyongfeng with PID 15916 (C:\Users\31126\Desktop\bigmarket-lite\bigmarket-app\target\classes started by zhaoyongfeng in C:\Users\31126\Desktop\bigmarket-lite)
24-11-23.17:13:00.218 [main ] INFO Application - The following 1 profile is active: "dev"
24-11-23.17:13:01.165 [main ] INFO RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
24-11-23.17:13:01.168 [main ] INFO RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
24-11-23.17:13:01.233 [main ] INFO RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 53 ms. Found 0 Redis repository interfaces.
24-11-23.17:13:01.829 [main ] INFO TomcatWebServer - Tomcat initialized with port(s): 8091 (http)
24-11-23.17:13:01.839 [main ] INFO Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8091"]
24-11-23.17:13:01.840 [main ] INFO StandardService - Starting service [Tomcat]
24-11-23.17:13:01.840 [main ] INFO StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.75]
24-11-23.17:13:02.026 [main ] INFO [/] - Initializing Spring embedded WebApplicationContext
24-11-23.17:13:02.027 [main ] INFO ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1772 ms
24-11-23.17:13:02.494 [main ] INFO Version - Redisson 3.23.4
24-11-23.17:13:03.866 [redisson-netty-2-4] INFO MasterPubSubConnectionPool - 1 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-23.17:13:03.878 [redisson-netty-2-13] INFO MasterConnectionPool - 5 connections initialized for 127.0.0.1/127.0.0.1:6379
24-11-23.17:13:04.644 [main ] INFO EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
24-11-23.17:13:04.671 [main ] INFO Http11NioProtocol - Starting ProtocolHandler ["http-nio-8091"]
24-11-23.17:13:04.684 [main ] INFO TomcatWebServer - Tomcat started on port(s): 8091 (http) with context path ''
24-11-23.17:13:04.698 [main ] INFO Application - Started Application in 5.002 seconds (JVM running for 7.29)
24-11-23.17:13:05.010 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:06.133 [RMI TCP Connection(1)-192.168.157.1] INFO [/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
24-11-23.17:13:06.133 [RMI TCP Connection(1)-192.168.157.1] INFO DispatcherServlet - Initializing Servlet 'dispatcherServlet'
24-11-23.17:13:06.134 [RMI TCP Connection(1)-192.168.157.1] INFO DispatcherServlet - Completed initialization in 1 ms
24-11-23.17:13:06.139 [RMI TCP Connection(2)-192.168.157.1] INFO HikariDataSource - HikariPool-1 - Starting...
24-11-23.17:13:06.476 [RMI TCP Connection(2)-192.168.157.1] INFO HikariDataSource - HikariPool-1 - Start completed.
24-11-23.17:13:10.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:15.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:20.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:22.029 [http-nio-8091-exec-2] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:0
24-11-23.17:13:22.029 [http-nio-8091-exec-4] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:0
24-11-23.17:13:22.273 [http-nio-8091-exec-2] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:0 response: {"code":"0000","data":[],"info":"调用成功"}
24-11-23.17:13:22.276 [http-nio-8091-exec-4] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:0 response: {"code":"0000","data":[],"info":"调用成功"}
24-11-23.17:13:25.014 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:30.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:35.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:36.779 [http-nio-8091-exec-5] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:100006
24-11-23.17:13:36.782 [http-nio-8091-exec-6] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:100006
24-11-23.17:13:36.800 [http-nio-8091-exec-5] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:100006 response: {"code":"0000","data":[{"awardId":101,"awardTitle":"随机积分","sort":1},{"awardId":102,"awardTitle":"7等奖","sort":2},{"awardId":103,"awardTitle":"6等奖","sort":3},{"awardId":104,"awardTitle":"5等奖","sort":4},{"awardId":105,"awardTitle":"4等奖","sort":5},{"awardId":106,"awardSubtitle":"抽奖1次后解锁","awardTitle":"3等奖","sort":6},{"awardId":107,"awardSubtitle":"抽奖1次后解锁","awardTitle":"2等奖","sort":7},{"awardId":108,"awardSubtitle":"抽奖2次后解锁","awardTitle":"1等奖","sort":8}],"info":"调用成功"}
24-11-23.17:13:36.800 [http-nio-8091-exec-6] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:100006 response: {"code":"0000","data":[{"awardId":101,"awardTitle":"随机积分","sort":1},{"awardId":102,"awardTitle":"7等奖","sort":2},{"awardId":103,"awardTitle":"6等奖","sort":3},{"awardId":104,"awardTitle":"5等奖","sort":4},{"awardId":105,"awardTitle":"4等奖","sort":5},{"awardId":106,"awardSubtitle":"抽奖1次后解锁","awardTitle":"3等奖","sort":6},{"awardId":107,"awardSubtitle":"抽奖1次后解锁","awardTitle":"2等奖","sort":7},{"awardId":108,"awardSubtitle":"抽奖2次后解锁","awardTitle":"1等奖","sort":8}],"info":"调用成功"}
24-11-23.17:13:38.311 [http-nio-8091-exec-8] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:38.335 [http-nio-8091-exec-8] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:40.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:40.458 [http-nio-8091-exec-13] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:40.471 [http-nio-8091-exec-13] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:40.590 [http-nio-8091-exec-10] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:40.601 [http-nio-8091-exec-10] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:41.740 [http-nio-8091-exec-11] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:41.751 [http-nio-8091-exec-11] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:41.922 [http-nio-8091-exec-17] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:41.937 [http-nio-8091-exec-17] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:42.045 [http-nio-8091-exec-18] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:42.057 [http-nio-8091-exec-18] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:42.755 [http-nio-8091-exec-14] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:42.767 [http-nio-8091-exec-14] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:42.929 [http-nio-8091-exec-15] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:42.939 [http-nio-8091-exec-15] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:43.076 [http-nio-8091-exec-22] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:43.087 [http-nio-8091-exec-22] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:43.883 [http-nio-8091-exec-23] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:43.894 [http-nio-8091-exec-23] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:44.028 [http-nio-8091-exec-24] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:44.039 [http-nio-8091-exec-24] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:44.674 [http-nio-8091-exec-19] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:44.685 [http-nio-8091-exec-19] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:44.837 [http-nio-8091-exec-27] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:44.849 [http-nio-8091-exec-27] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:45.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:48.440 [http-nio-8091-exec-21] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:48.450 [http-nio-8091-exec-21] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:50.011 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:13:52.037 [http-nio-8091-exec-16] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:100006
24-11-23.17:13:52.039 [http-nio-8091-exec-12] INFO RaffleController - 查询抽奖奖品列表配开始 strategyId:100006
24-11-23.17:13:52.039 [http-nio-8091-exec-16] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:100006 response: {"code":"0000","data":[{"awardId":101,"awardTitle":"随机积分","sort":1},{"awardId":102,"awardTitle":"7等奖","sort":2},{"awardId":103,"awardTitle":"6等奖","sort":3},{"awardId":104,"awardTitle":"5等奖","sort":4},{"awardId":105,"awardTitle":"4等奖","sort":5},{"awardId":106,"awardSubtitle":"抽奖1次后解锁","awardTitle":"3等奖","sort":6},{"awardId":107,"awardSubtitle":"抽奖1次后解锁","awardTitle":"2等奖","sort":7},{"awardId":108,"awardSubtitle":"抽奖2次后解锁","awardTitle":"1等奖","sort":8}],"info":"调用成功"}
24-11-23.17:13:52.042 [http-nio-8091-exec-12] INFO RaffleController - 查询抽奖奖品列表配置完成 strategyId:100006 response: {"code":"0000","data":[{"awardId":101,"awardTitle":"随机积分","sort":1},{"awardId":102,"awardTitle":"7等奖","sort":2},{"awardId":103,"awardTitle":"6等奖","sort":3},{"awardId":104,"awardTitle":"5等奖","sort":4},{"awardId":105,"awardTitle":"4等奖","sort":5},{"awardId":106,"awardSubtitle":"抽奖1次后解锁","awardTitle":"3等奖","sort":6},{"awardId":107,"awardSubtitle":"抽奖1次后解锁","awardTitle":"2等奖","sort":7},{"awardId":108,"awardSubtitle":"抽奖2次后解锁","awardTitle":"1等奖","sort":8}],"info":"调用成功"}
24-11-23.17:13:52.795 [http-nio-8091-exec-32] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:52.807 [http-nio-8091-exec-32] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:53.408 [http-nio-8091-exec-33] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:53.418 [http-nio-8091-exec-33] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:53.710 [http-nio-8091-exec-26] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:53.720 [http-nio-8091-exec-26] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:53.863 [http-nio-8091-exec-35] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:53.878 [http-nio-8091-exec-35] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:54.019 [http-nio-8091-exec-36] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:54.031 [http-nio-8091-exec-36] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:54.156 [http-nio-8091-exec-37] INFO RaffleController - 抽奖策略装配开始 strategyId:100006
24-11-23.17:13:54.166 [http-nio-8091-exec-37] INFO RaffleController - 抽奖策略装配完成 strategyId:100006 response: {"code":"0000","data":true,"info":"调用成功"}
24-11-23.17:13:55.006 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:00.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:04.231 [http-nio-8091-exec-39] INFO RaffleController - 随机抽奖开始 strategyId: 100006
24-11-23.17:14:04.238 [http-nio-8091-exec-39] INFO DefaultLogicChain - 抽奖责任链-默认处理 userId: system strategyId: 100006 ruleModel: rule_default awardId: 105
24-11-23.17:14:04.240 [http-nio-8091-exec-39] INFO AbstractRaffleStrategy - 抽奖策略计算-责任链 system 100006 105 rule_default
24-11-23.17:14:04.263 [http-nio-8091-exec-39] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减 userId:system strategyId:100006 awardId:105
24-11-23.17:14:04.266 [http-nio-8091-exec-39] INFO RuleStockLogicTreeNode - 规则过滤-库存扣减-成功 userId:system strategyId:100006 awardId:105
24-11-23.17:14:04.287 [http-nio-8091-exec-39] INFO DecisionTreeEngine - 决策树引擎【规则树-兜底奖励】treeId:tree_luck_award node:rule_stock code:0001
24-11-23.17:14:04.288 [http-nio-8091-exec-39] INFO AbstractRaffleStrategy - 抽奖策略计算-规则树 system 100006 105 null
24-11-23.17:14:04.299 [http-nio-8091-exec-39] INFO RaffleController - 随机抽奖完成 strategyId: 100006 response: {"code":"0000","data":{"awardId":105,"awardIndex":5},"info":"调用成功"}
24-11-23.17:14:05.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:10.011 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:10.015 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存 strategyId:100006 awardId:105
24-11-23.17:14:15.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:20.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:25.013 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:30.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:35.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:40.012 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:45.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:50.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:14:55.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:00.004 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:05.005 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:10.003 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:15.008 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:20.012 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:25.009 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:30.015 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
24-11-23.17:15:35.010 [scheduling-1 ] INFO UpdateAwardStockJob - 定时任务,更新奖品消耗库存【延迟队列获取,降低对数据库的更新频次,不要产生竞争】
version: '3.8'
# 命令执行 docker-compose -f docker-compose-app.yml up -d
services:
big-market-app:
image: zyf/big-market-app:1.0
container_name: big-market-app
restart: always
ports:
- "8091:8091"
environment:
- TZ=PRC
- SERVER_PORT=8091
- APP_CONFIG_API_VERSION=v1
- APP_CONFIG_CROSS_ORIGIN=*
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=123456
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/big_market?serverTimezone=UTC&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Shanghai
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.cj.jdbc.Driver
- SPRING_HIKARI_POOL_NAME=Retail_HikariCP
- REDIS_SDK_CONFIG_HOST=redis
- REDIS_SDK_CONFIG_PORT=6379
volumes:
- ./log:/data/log
networks:
- my-network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
big-market-front-app:
container_name: big-market-front-app
image: zyf/big-market-front-app:1.1
restart: always
networks:
- my-network
ports:
- 3000:3000
environment:
- API_HOST_URL=http://10.124.226.64:8091
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://0.0.0.0:3000/" ]
interval: 1m
timeout: 10s
retries: 3
networks:
my-network:
driver: bridge
# 命令执行 docker-compose -f docker-compose-environment.yml up -d
version: '3.9'
services:
mysql:
image: mysql:8.0.32
container_name: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: 123456
networks:
- my-network
depends_on:
- mysql-job-dbdata
ports:
- "13306:3306"
volumes:
- ./mysql/sql:/docker-entrypoint-initdb.d
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
interval: 5s
timeout: 10s
retries: 10
start_period: 15s
volumes_from:
- mysql-job-dbdata
# 自动加载数据
mysql-job-dbdata:
image: alpine:3.18.2
container_name: mysql-job-dbdata
volumes:
- /var/lib/mysql
# phpmyadmin https://hub.docker.com/_/phpmyadmin
phpmyadmin:
image: phpmyadmin:5.2.1
container_name: phpmyadmin
hostname: phpmyadmin
ports:
- 8899:80
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
- MYSQL_ROOT_PASSWORD=123456
depends_on:
mysql:
condition: service_healthy
networks:
- my-network
# Redis
redis:
image: redis:6.2
container_name: redis
restart: always
hostname: redis
privileged: true
ports:
- 16379:6379
volumes:
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
- my-network
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 3
# RedisAdmin https://github.com/joeferner/redis-commander
redis-admin:
image: spryker/redis-commander:0.8.0
container_name: redis-admin
hostname: redis-commander
restart: always
ports:
- 8081:8081
environment:
- REDIS_HOSTS=local:redis:6379
- HTTP_USER=admin
- HTTP_PASSWORD=admin
- LANG=C.UTF-8
- LANGUAGE=C.UTF-8
- LC_ALL=C.UTF-8
networks:
- my-network
depends_on:
redis:
condition: service_healthy
networks:
my-network:
driver: bridge
# ************************************************************
# Sequel Ace SQL dump
# 版本号: 20050
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# 主机: 127.0.0.1 (MySQL 5.6.39)
# 数据库: big_market
# 生成时间: 2024-03-02 04:59:01 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE='NO_AUTO_VALUE_ON_ZERO', SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE database if NOT EXISTS `big_market` default character set utf8mb4;
use `big_market`;
# 转储表 award
# ------------------------------------------------------------
DROP TABLE IF EXISTS `award`;
CREATE TABLE `award` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`award_id` int(8) NOT NULL COMMENT '抽奖奖品ID - 内部流转使用',
`award_key` varchar(32) NOT NULL COMMENT '奖品对接标识 - 每一个都是一个对应的发奖策略',
`award_config` varchar(32) NOT NULL COMMENT '奖品配置信息',
`award_desc` varchar(128) NOT NULL COMMENT '奖品内容描述',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='奖品表';
LOCK TABLES `award` WRITE;
/*!40000 ALTER TABLE `award` DISABLE KEYS */;
INSERT INTO `award` (`id`, `award_id`, `award_key`, `award_config`, `award_desc`, `create_time`, `update_time`)
VALUES
(1,101,'user_credit_random','1,100','用户积分【优先透彻规则范围,如果没有则走配置】','2023-12-09 11:07:06','2023-12-09 11:21:31'),
(2,102,'openai_use_count','5','OpenAI 增加使用次数','2023-12-09 11:07:06','2023-12-09 11:12:59'),
(3,103,'openai_use_count','10','OpenAI 增加使用次数','2023-12-09 11:07:06','2023-12-09 11:12:59'),
(4,104,'openai_use_count','20','OpenAI 增加使用次数','2023-12-09 11:07:06','2023-12-09 11:12:58'),
(5,105,'openai_model','gpt-4','OpenAI 增加模型','2023-12-09 11:07:06','2023-12-09 11:12:01'),
(6,106,'openai_model','dall-e-2','OpenAI 增加模型','2023-12-09 11:07:06','2023-12-09 11:12:08'),
(7,107,'openai_model','dall-e-3','OpenAI 增加模型','2023-12-09 11:07:06','2023-12-09 11:12:10'),
(8,108,'openai_use_count','100','OpenAI 增加使用次数','2023-12-09 11:07:06','2023-12-09 11:12:55'),
(9,109,'openai_model','gpt-4,dall-e-2,dall-e-3','OpenAI 增加模型','2023-12-09 11:07:06','2023-12-09 11:12:39'),
(10,100,'user_credit_blacklist','1','黑名单积分','2024-01-06 12:30:40','2024-01-06 12:30:46');
/*!40000 ALTER TABLE `award` ENABLE KEYS */;
UNLOCK TABLES;
# 转储表 raffle_activity
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity`;
CREATE TABLE `raffle_activity` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`activity_name` varchar(64) NOT NULL COMMENT '活动名称',
`activity_desc` varchar(128) NOT NULL COMMENT '活动描述',
`begin_date_time` datetime NOT NULL COMMENT '开始时间',
`end_date_time` datetime NOT NULL COMMENT '结束时间',
`stock_count` int(11) NOT NULL COMMENT '库存总量',
`stock_count_surplus` int(11) NOT NULL COMMENT '剩余库存',
`activity_count_id` bigint(12) NOT NULL COMMENT '活动参与次数配置',
`strategy_id` bigint(8) NOT NULL COMMENT '抽奖策略ID',
`state` varchar(8) NOT NULL COMMENT '活动状态',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_activity_id` (`activity_id`),
KEY `idx_begin_date_time` (`begin_date_time`),
KEY `idx_end_date_time` (`end_date_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动表';
# 转储表 raffle_activity_count
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_count`;
CREATE TABLE `raffle_activity_count` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`activity_count_id` bigint(12) NOT NULL COMMENT '活动次数编号',
`total_count` int(8) NOT NULL COMMENT '总次数',
`day_count` int(8) NOT NULL COMMENT '日次数',
`month_count` int(8) NOT NULL COMMENT '月次数',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_activity_count_id` (`activity_count_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动次数配置表';
# 转储表 rule_tree
# ------------------------------------------------------------
DROP TABLE IF EXISTS `rule_tree`;
CREATE TABLE `rule_tree` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`tree_id` varchar(32) NOT NULL COMMENT '规则树ID',
`tree_name` varchar(64) NOT NULL COMMENT '规则树名称',
`tree_desc` varchar(128) DEFAULT NULL COMMENT '规则树描述',
`tree_node_rule_key` varchar(32) NOT NULL COMMENT '规则树根入口规则',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_tree_id` (`tree_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='规则表-树';
LOCK TABLES `rule_tree` WRITE;
/*!40000 ALTER TABLE `rule_tree` DISABLE KEYS */;
INSERT INTO `rule_tree` (`id`, `tree_id`, `tree_name`, `tree_desc`, `tree_node_rule_key`, `create_time`, `update_time`)
VALUES
(1,'tree_lock_1','规则树','规则树','rule_lock','2024-01-27 10:01:59','2024-02-15 07:49:59'),
(2,'tree_luck_award','规则树-兜底奖励','规则树-兜底奖励','rule_stock','2024-02-15 07:35:06','2024-02-15 07:50:20'),
(3,'tree_lock_2','规则树','规则树','rule_lock','2024-01-27 10:01:59','2024-02-15 07:49:59');
/*!40000 ALTER TABLE `rule_tree` ENABLE KEYS */;
UNLOCK TABLES;
# 转储表 rule_tree_node
# ------------------------------------------------------------
DROP TABLE IF EXISTS `rule_tree_node`;
CREATE TABLE `rule_tree_node` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`tree_id` varchar(32) NOT NULL COMMENT '规则树ID',
`rule_key` varchar(32) NOT NULL COMMENT '规则Key',
`rule_desc` varchar(64) NOT NULL COMMENT '规则描述',
`rule_value` varchar(128) DEFAULT NULL COMMENT '规则比值',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='规则表-树节点';
LOCK TABLES `rule_tree_node` WRITE;
/*!40000 ALTER TABLE `rule_tree_node` DISABLE KEYS */;
INSERT INTO `rule_tree_node` (`id`, `tree_id`, `rule_key`, `rule_desc`, `rule_value`, `create_time`, `update_time`)
VALUES
(1,'tree_lock_1','rule_lock','限定用户已完成N次抽奖后解锁','1','2024-01-27 10:03:09','2024-02-15 07:50:57'),
(2,'tree_lock_1','rule_luck_award','兜底奖品随机积分','101:1,100','2024-01-27 10:03:09','2024-02-15 07:51:00'),
(3,'tree_lock_1','rule_stock','库存扣减规则',NULL,'2024-01-27 10:04:43','2024-02-15 07:51:02'),
(4,'tree_luck_award','rule_stock','库存扣减规则',NULL,'2024-02-15 07:35:55','2024-02-15 07:39:19'),
(5,'tree_luck_award','rule_luck_award','兜底奖品随机积分','101:1,100','2024-02-15 07:35:55','2024-02-15 07:39:23'),
(6,'tree_lock_2','rule_lock','限定用户已完成N次抽奖后解锁','2','2024-01-27 10:03:09','2024-02-15 07:52:20'),
(7,'tree_lock_2','rule_luck_award','兜底奖品随机积分','101:1,100','2024-01-27 10:03:09','2024-02-08 19:59:43'),
(8,'tree_lock_2','rule_stock','库存扣减规则',NULL,'2024-01-27 10:04:43','2024-02-03 10:40:21');
/*!40000 ALTER TABLE `rule_tree_node` ENABLE KEYS */;
UNLOCK TABLES;
# 转储表 rule_tree_node_line
# ------------------------------------------------------------
DROP TABLE IF EXISTS `rule_tree_node_line`;
CREATE TABLE `rule_tree_node_line` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`tree_id` varchar(32) NOT NULL COMMENT '规则树ID',
`rule_node_from` varchar(32) NOT NULL COMMENT '规则Key节点 From',
`rule_node_to` varchar(32) NOT NULL COMMENT '规则Key节点 To',
`rule_limit_type` varchar(8) NOT NULL COMMENT '限定类型;1:=;2:>;3:<;4:>=;5<=;6:enum[枚举范围];',
`rule_limit_value` varchar(32) NOT NULL COMMENT '限定值(到下个节点)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='规则表-树节点连线';
LOCK TABLES `rule_tree_node_line` WRITE;
/*!40000 ALTER TABLE `rule_tree_node_line` DISABLE KEYS */;
INSERT INTO `rule_tree_node_line` (`id`, `tree_id`, `rule_node_from`, `rule_node_to`, `rule_limit_type`, `rule_limit_value`, `create_time`, `update_time`)
VALUES
(1,'tree_lock_1','rule_lock','rule_stock','EQUAL','ALLOW','0000-00-00 00:00:00','2024-02-15 07:55:08'),
(2,'tree_lock_1','rule_lock','rule_luck_award','EQUAL','TAKE_OVER','0000-00-00 00:00:00','2024-02-15 07:55:11'),
(3,'tree_lock_1','rule_stock','rule_luck_award','EQUAL','ALLOW','0000-00-00 00:00:00','2024-02-15 07:55:13'),
(4,'tree_luck_award','rule_stock','rule_luck_award','EQUAL','ALLOW','2024-02-15 07:37:31','2024-02-15 07:39:28'),
(5,'tree_lock_2','rule_lock','rule_stock','EQUAL','ALLOW','0000-00-00 00:00:00','2024-02-15 07:55:08'),
(6,'tree_lock_2','rule_lock','rule_luck_award','EQUAL','TAKE_OVER','0000-00-00 00:00:00','2024-02-15 07:55:11'),
(7,'tree_lock_2','rule_stock','rule_luck_award','EQUAL','ALLOW','0000-00-00 00:00:00','2024-02-15 07:55:13');
/*!40000 ALTER TABLE `rule_tree_node_line` ENABLE KEYS */;
UNLOCK TABLES;
# 转储表 strategy
# ------------------------------------------------------------
DROP TABLE IF EXISTS `strategy`;
CREATE TABLE `strategy` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`strategy_id` bigint(8) NOT NULL COMMENT '抽奖策略ID',
`strategy_desc` varchar(128) NOT NULL COMMENT '抽奖策略描述',
`rule_models` varchar(256) DEFAULT NULL COMMENT '规则模型,rule配置的模型同步到此表,便于使用',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_strategy_id` (`strategy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖策略';
LOCK TABLES `strategy` WRITE;
/*!40000 ALTER TABLE `strategy` DISABLE KEYS */;
INSERT INTO `strategy` (`id`, `strategy_id`, `strategy_desc`, `rule_models`, `create_time`, `update_time`)
VALUES
(1,100001,'抽奖策略','rule_blacklist,rule_weight','2023-12-09 09:37:19','2024-01-20 11:39:23'),
(2,100003,'抽奖策略-验证lock','rule_blacklist','2024-01-13 10:34:06','2024-01-20 15:03:19'),
(3,100002,'抽奖策略-非完整1概率',NULL,'2023-12-09 09:37:19','2024-02-03 10:14:17'),
(4,100004,'抽奖策略-随机抽奖',NULL,'2023-12-09 09:37:19','2024-01-20 19:21:03'),
(5,100005,'抽奖策略-测试概率计算',NULL,'2023-12-09 09:37:19','2024-01-21 21:54:58'),
(6,100006,'抽奖策略-规则树',NULL,'2024-02-03 09:53:40','2024-02-03 09:53:40');
/*!40000 ALTER TABLE `strategy` ENABLE KEYS */;
UNLOCK TABLES;
# 转储表 strategy_award
# ------------------------------------------------------------
DROP TABLE IF EXISTS `strategy_award`;
CREATE TABLE `strategy_award` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`strategy_id` bigint(8) NOT NULL COMMENT '抽奖策略ID',
`award_id` int(8) NOT NULL COMMENT '抽奖奖品ID - 内部流转使用',
`award_title` varchar(128) NOT NULL COMMENT '抽奖奖品标题',
`award_subtitle` varchar(128) DEFAULT NULL COMMENT '抽奖奖品副标题',
`award_count` int(8) NOT NULL DEFAULT '0' COMMENT '奖品库存总量',
`award_count_surplus` int(8) NOT NULL DEFAULT '0' COMMENT '奖品库存剩余',
`award_rate` decimal(6,4) NOT NULL COMMENT '奖品中奖概率',
`rule_models` varchar(256) DEFAULT NULL COMMENT '规则模型,rule配置的模型同步到此表,便于使用',
`sort` int(2) NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `idx_strategy_id_award_id` (`strategy_id`,`award_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖策略奖品概率';
LOCK TABLES `strategy_award` WRITE;
/*!40000 ALTER TABLE `strategy_award` DISABLE KEYS */;
INSERT INTO `strategy_award` (`id`, `strategy_id`, `award_id`, `award_title`, `award_subtitle`, `award_count`, `award_count_surplus`, `award_rate`, `rule_models`, `sort`, `create_time`, `update_time`)
VALUES
(1,100001,101,'随机积分',NULL,80000,79998,0.3000,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-25 22:40:50'),
(2,100001,102,'5次使用',NULL,10000,9999,0.2000,'tree_luck_award',2,'2023-12-09 09:39:18','2024-02-25 22:40:55'),
(3,100001,103,'10次使用',NULL,5000,4998,0.2000,'tree_luck_award',3,'2023-12-09 09:42:36','2024-02-25 22:40:45'),
(4,100001,104,'20次使用',NULL,4000,3999,0.1000,'tree_luck_award',4,'2023-12-09 09:43:15','2024-02-25 22:40:00'),
(5,100001,105,'增加gpt-4对话模型',NULL,600,600,0.1000,'tree_luck_award',5,'2023-12-09 09:43:47','2024-02-15 07:42:13'),
(6,100001,106,'增加dall-e-2画图模型',NULL,200,200,0.0500,'tree_luck_award',6,'2023-12-09 09:44:20','2024-02-15 07:42:14'),
(7,100001,107,'增加dall-e-3画图模型','抽奖1次后解锁',200,200,0.0400,'tree_luck_award',7,'2023-12-09 09:45:38','2024-02-15 07:42:17'),
(8,100001,108,'增加100次使用','抽奖2次后解锁',199,199,0.0099,'tree_luck_award',8,'2023-12-09 09:46:02','2024-02-15 07:42:21'),
(9,100001,109,'解锁全部模型','抽奖6次后解锁',1,1,0.0001,'tree_luck_award',9,'2023-12-09 09:46:39','2024-02-15 07:42:26'),
(10,100002,101,'随机积分',NULL,1,1,0.5000,'tree_luck_award',1,'2023-12-09 09:46:39','2024-02-15 07:42:29'),
(11,100002,102,'5次使用',NULL,1,1,0.1000,'tree_luck_award',2,'2023-12-09 09:46:39','2024-02-15 07:42:32'),
(12,100002,106,'增加dall-e-2画图模型',NULL,1,1,0.0100,'tree_luck_award',3,'2023-12-09 09:46:39','2024-02-15 07:42:35'),
(13,100003,107,'增加dall-e-3画图模型','抽奖1次后解锁',200,200,0.0400,'tree_luck_award',7,'2023-12-09 09:45:38','2024-02-15 07:42:38'),
(14,100003,108,'增加100次使用','抽奖2次后解锁',199,199,0.0099,'tree_luck_award',8,'2023-12-09 09:46:02','2024-02-15 07:42:41'),
(15,100003,109,'解锁全部模型','抽奖6次后解锁',1,1,0.0001,'tree_luck_award',9,'2023-12-09 09:46:39','2024-02-15 07:42:44'),
(16,100004,109,'解锁全部模型','抽奖6次后解锁',1,1,1.0000,'tree_luck_award',9,'2023-12-09 09:46:39','2024-02-15 07:42:46'),
(17,100005,101,'随机积分',NULL,80000,80000,0.0300,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-15 07:42:47'),
(18,100005,102,'随机积分',NULL,80000,80000,0.0300,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-15 07:42:48'),
(19,100005,103,'随机积分',NULL,80000,80000,0.0300,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-15 07:42:50'),
(20,100005,104,'随机积分',NULL,80000,80000,0.0300,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-15 07:42:51'),
(21,100005,105,'随机积分',NULL,80000,80000,0.0010,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-15 07:42:52'),
(22,100006,101,'随机积分',NULL,100,64,0.0200,'tree_luck_award',1,'2023-12-09 09:38:31','2024-02-29 08:06:30'),
(23,100006,102,'7等奖',NULL,100,28,0.0300,'tree_luck_award',2,'2023-12-09 09:38:31','2024-02-25 21:52:35'),
(24,100006,103,'6等奖',NULL,100,48,0.0300,'tree_luck_award',3,'2023-12-09 09:38:31','2024-02-15 15:38:15'),
(25,100006,104,'5等奖',NULL,100,45,0.0300,'tree_luck_award',4,'2023-12-09 09:38:31','2024-02-15 15:38:35'),
(26,100006,105,'4等奖',NULL,100,41,0.0300,'tree_luck_award',5,'2023-12-09 09:38:31','2024-02-16 08:46:00'),
(27,100006,106,'3等奖','抽奖1次后解锁',100,31,0.0300,'tree_lock_1',6,'2023-12-09 09:38:31','2024-02-29 08:06:25'),
(28,100006,107,'2等奖','抽奖1次后解锁',100,29,0.0300,'tree_lock_1',7,'2023-12-09 09:38:31','2024-02-29 08:06:20'),
(29,100006,108,'1等奖','抽奖2次后解锁',100,35,0.0300,'tree_lock_2',8,'2023-12-09 09:38:31','2024-02-29 08:06:35');
/*!40000 ALTER TABLE `strategy_award` ENABLE KEYS */;
UNLOCK TABLES;
# 转储表 strategy_rule
# ------------------------------------------------------------
DROP TABLE IF EXISTS `strategy_rule`;
CREATE TABLE `strategy_rule` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`strategy_id` int(8) NOT NULL COMMENT '抽奖策略ID',
`award_id` int(8) DEFAULT NULL COMMENT '抽奖奖品ID【规则类型为策略,则不需要奖品ID】',
`rule_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '抽象规则类型;1-策略规则、2-奖品规则',
`rule_model` varchar(16) NOT NULL COMMENT '抽奖规则类型【rule_random - 随机值计算、rule_lock - 抽奖几次后解锁、rule_luck_award - 幸运奖(兜底奖品)】',
`rule_value` varchar(256) NOT NULL COMMENT '抽奖规则比值',
`rule_desc` varchar(128) NOT NULL COMMENT '抽奖规则描述',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_strategy_id_award_id` (`strategy_id`,`award_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖策略规则';
LOCK TABLES `strategy_rule` WRITE;
/*!40000 ALTER TABLE `strategy_rule` DISABLE KEYS */;
INSERT INTO `strategy_rule` (`id`, `strategy_id`, `award_id`, `rule_type`, `rule_model`, `rule_value`, `rule_desc`, `create_time`, `update_time`)
VALUES
(13,100001,NULL,1,'rule_weight','4000:102,103,104,105 5000:102,103,104,105,106,107 6000:102,103,104,105,106,107,108,109','消耗6000分,必中奖范围','2023-12-09 10:30:43','2023-12-31 14:51:50'),
(14,100001,NULL,1,'rule_blacklist','101:user001,user002,user003','黑名单抽奖,积分兜底','2023-12-09 12:59:45','2024-02-14 18:16:20');
/*!40000 ALTER TABLE `strategy_rule` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
# ************************************************************
# Sequel Ace SQL dump
# 版本号: 20050
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# 主机: 127.0.0.1 (MySQL 5.6.39)
# 数据库: big_market_01
# 生成时间: 2024-03-02 05:02:16 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE='NO_AUTO_VALUE_ON_ZERO', SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE database if NOT EXISTS `big_market_01` default character set utf8mb4;
use `big_market_01`;
# 转储表 raffle_activity_account
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_account`;
CREATE TABLE `raffle_activity_account` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` varchar(32) NOT NULL COMMENT '用户ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`total_count` int(8) NOT NULL COMMENT '总次数',
`total_count_surplus` int(8) NOT NULL COMMENT '总次数-剩余',
`day_count` int(8) NOT NULL COMMENT '日次数',
`day_count_surplus` int(8) NOT NULL COMMENT '日次数-剩余',
`month_count` int(8) NOT NULL COMMENT '月次数',
`month_count_surplus` int(8) NOT NULL COMMENT '月次数-剩余',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_user_id_activity_id` (`user_id`,`activity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动账户表';
# 转储表 raffle_activity_account_flow
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_account_flow`;
CREATE TABLE `raffle_activity_account_flow` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` varchar(32) NOT NULL COMMENT '用户ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`total_count` int(8) NOT NULL COMMENT '总次数',
`day_count` int(8) NOT NULL COMMENT '日次数',
`month_count` int(8) NOT NULL COMMENT '月次数',
`flow_id` varchar(32) NOT NULL COMMENT '流水ID - 生成的唯一ID',
`flow_channel` varchar(12) NOT NULL DEFAULT 'activity' COMMENT '流水渠道(activity-活动领取、sale-购买、redeem-兑换、free-免费赠送)',
`biz_id` varchar(12) NOT NULL COMMENT '业务ID(外部透传,活动ID、订单ID)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_flow_id` (`flow_id`),
UNIQUE KEY `uq_biz_id` (`biz_id`),
KEY `idx_user_id_activity_id` (`user_id`,`activity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动账户流水表';
# 转储表 raffle_activity_order
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_order`;
CREATE TABLE `raffle_activity_order` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` varchar(32) NOT NULL COMMENT '用户ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`activity_name` varchar(64) NOT NULL COMMENT '活动名称',
`strategy_id` bigint(8) NOT NULL COMMENT '抽奖策略ID',
`order_id` varchar(12) NOT NULL COMMENT '订单ID',
`order_time` datetime NOT NULL COMMENT '下单时间',
`state` varchar(8) NOT NULL COMMENT '订单状态(not_used、used、expire)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_order_id` (`order_id`),
KEY `idx_user_id_activity_id` (`user_id`,`activity_id`,`state`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动单';
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
# ************************************************************
# Sequel Ace SQL dump
# 版本号: 20050
#
# https://sequel-ace.com/
# https://github.com/Sequel-Ace/Sequel-Ace
#
# 主机: 127.0.0.1 (MySQL 5.6.39)
# 数据库: big_market_01
# 生成时间: 2024-03-02 05:02:16 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE='NO_AUTO_VALUE_ON_ZERO', SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE database if NOT EXISTS `big_market_01` default character set utf8mb4;
use `big_market_01`;
# 转储表 raffle_activity_account
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_account`;
CREATE TABLE `raffle_activity_account` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` varchar(32) NOT NULL COMMENT '用户ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`total_count` int(8) NOT NULL COMMENT '总次数',
`total_count_surplus` int(8) NOT NULL COMMENT '总次数-剩余',
`day_count` int(8) NOT NULL COMMENT '日次数',
`day_count_surplus` int(8) NOT NULL COMMENT '日次数-剩余',
`month_count` int(8) NOT NULL COMMENT '月次数',
`month_count_surplus` int(8) NOT NULL COMMENT '月次数-剩余',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_user_id_activity_id` (`user_id`,`activity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动账户表';
# 转储表 raffle_activity_account_flow
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_account_flow`;
CREATE TABLE `raffle_activity_account_flow` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` varchar(32) NOT NULL COMMENT '用户ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`total_count` int(8) NOT NULL COMMENT '总次数',
`day_count` int(8) NOT NULL COMMENT '日次数',
`month_count` int(8) NOT NULL COMMENT '月次数',
`flow_id` varchar(32) NOT NULL COMMENT '流水ID - 生成的唯一ID',
`flow_channel` varchar(12) NOT NULL DEFAULT 'activity' COMMENT '流水渠道(activity-活动领取、sale-购买、redeem-兑换、free-免费赠送)',
`biz_id` varchar(12) NOT NULL COMMENT '业务ID(外部透传,活动ID、订单ID)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_flow_id` (`flow_id`),
UNIQUE KEY `uq_biz_id` (`biz_id`),
KEY `idx_user_id_activity_id` (`user_id`,`activity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动账户流水表';
# 转储表 raffle_activity_order
# ------------------------------------------------------------
DROP TABLE IF EXISTS `raffle_activity_order`;
CREATE TABLE `raffle_activity_order` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`user_id` varchar(32) NOT NULL COMMENT '用户ID',
`activity_id` bigint(12) NOT NULL COMMENT '活动ID',
`activity_name` varchar(64) NOT NULL COMMENT '活动名称',
`strategy_id` bigint(8) NOT NULL COMMENT '抽奖策略ID',
`order_id` varchar(12) NOT NULL COMMENT '订单ID',
`order_time` datetime NOT NULL COMMENT '下单时间',
`state` varchar(8) NOT NULL COMMENT '订单状态(not_used、used、expire)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uq_order_id` (`order_id`),
KEY `idx_user_id_activity_id` (`user_id`,`activity_id`,`state`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抽奖活动单';
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 50639
Source Host : localhost:3306
Source Schema : road-map
Target Server Type : MySQL
Target Server Version : 50639
File Encoding : 65001
Date: 15/07/2023 09:26:39
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
CREATE database if NOT EXISTS `xfg_frame_archetype` default character set utf8mb4 collate utf8mb4_0900_ai_ci;
use `xfg_frame_archetype`;
-- ----------------------------
-- Table structure for employee
-- ----------------------------
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员ID',
`employee_name` varchar(32) NOT NULL DEFAULT '' COMMENT '雇员姓名',
`employee_level` varchar(8) NOT NULL DEFAULT '' COMMENT '雇员级别',
`employee_title` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员岗位Title',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_employee_number` (`employee_number`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of employee
-- ----------------------------
BEGIN;
INSERT INTO `employee` VALUES (1, '10000001', 'sXvfDpsWnJdLsCVk64tJgw==', 'T-3', '中级工程师', '2023-07-14 15:26:26', '2023-07-14 15:26:26');
INSERT INTO `employee` VALUES (2, '10000010', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
INSERT INTO `employee` VALUES (3, '10000011', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
INSERT INTO `employee` VALUES (4, '10000012', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
INSERT INTO `employee` VALUES (5, '10000013', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
INSERT INTO `employee` VALUES (6, '10000014', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40');
INSERT INTO `employee` VALUES (9, '10000002', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-15 07:42:52', '2023-07-15 07:42:52');
INSERT INTO `employee` VALUES (22, '10000015', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31');
INSERT INTO `employee` VALUES (23, '10000016', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31');
INSERT INTO `employee` VALUES (24, '10000017', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31');
INSERT INTO `employee` VALUES (39, '10000022', 'GyG+V0r6mBCNsdusuKl03g==', 'T1', '实习工程师', '2023-07-15 09:17:49', '2023-07-15 09:17:49');
COMMIT;
-- ----------------------------
-- Table structure for employee_salary
-- ----------------------------
DROP TABLE IF EXISTS `employee_salary`;
CREATE TABLE `employee_salary` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员编号',
`salary_total_amount` decimal(8,2) NOT NULL COMMENT '薪资总额',
`salary_merit_amount` decimal(8,2) NOT NULL COMMENT '绩效工资',
`salary_base_amount` decimal(8,2) NOT NULL COMMENT '基础工资',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_employee_number` (`employee_number`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of employee_salary
-- ----------------------------
BEGIN;
INSERT INTO `employee_salary` VALUES (1, '10000001', 5100.00, 1020.00, 4080.00, '2023-07-14 16:09:06', '2023-07-14 16:09:06');
INSERT INTO `employee_salary` VALUES (2, '10000010', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
INSERT INTO `employee_salary` VALUES (3, '10000011', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
INSERT INTO `employee_salary` VALUES (4, '10000012', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
INSERT INTO `employee_salary` VALUES (5, '10000013', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
INSERT INTO `employee_salary` VALUES (6, '10000014', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10');
INSERT INTO `employee_salary` VALUES (8, '10000022', 100.00, 10.00, 90.00, '2023-07-15 09:17:49', '2023-07-15 09:17:49');
COMMIT;
-- ----------------------------
-- Table structure for employee_salary_adjust
-- ----------------------------
DROP TABLE IF EXISTS `employee_salary_adjust`;
CREATE TABLE `employee_salary_adjust` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员编号',
`adjust_order_id` varchar(32) NOT NULL DEFAULT '' COMMENT '调薪单号',
`adjust_total_amount` decimal(8,2) NOT NULL COMMENT '总额调薪',
`adjust_base_amount` decimal(8,2) NOT NULL COMMENT '基础调薪',
`adjust_merit_amount` decimal(8,2) NOT NULL COMMENT '绩效调薪',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_order_id` (`adjust_order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of employee_salary_adjust
-- ----------------------------
BEGIN;
INSERT INTO `employee_salary_adjust` VALUES (1, '10000001', '109089990198888811', 1000.00, 800.00, 200.00, '2023-07-14 16:55:53', '2023-07-14 16:55:53');
INSERT INTO `employee_salary_adjust` VALUES (2, '10000001', '100908977676001', 100.00, 20.00, 80.00, '2023-07-14 21:57:39', '2023-07-14 21:57:39');
COMMIT;
\ No newline at end of file
CONTAINER_NAME=big-market
IMAGE_NAME=fuzhengwei/big-market-app:1.0
PORT=8091
echo "容器部署开始 ${CONTAINER_NAME}"
# 停止容器
docker stop ${CONTAINER_NAME}
# 删除容器
docker rm ${CONTAINER_NAME}
# 启动容器
docker run --name ${CONTAINER_NAME} \
-p ${PORT}:${PORT} \
-d ${IMAGE_NAME}
echo "容器部署成功 ${CONTAINER_NAME}"
docker logs -f ${CONTAINER_NAME}
docker stop big-market-app
......@@ -8,12 +8,12 @@
<packaging>pom</packaging>
<modules>
<module>xfg-frame-archetype-lite-app</module>
<module>xfg-frame-archetype-lite-domain</module>
<module>xfg-frame-archetype-lite-trigger</module>
<module>xfg-frame-archetype-lite-infrastructure</module>
<module>xfg-frame-archetype-lite-types</module>
<module>xfg-frame-archetype-lite-api</module>
<module>bigmarket-app</module>
<module>bigmarket-domain</module>
<module>bigmarket-trigger</module>
<module>bigmarket-infrastructure</module>
<module>bigmarket-types</module>
<module>bigmarket-api</module>
</modules>
<properties>
......@@ -26,9 +26,9 @@
<developers>
<developer>
<name>xiaofuge</name>
<email>184172133@qq.com</email>
<organization>fuzhengwei</organization>
<name>zyf</name>
<email>2283865573@qq.com</email>
<organization>zhaoYF</organization>
<organizationUrl>https://github.com/fuzhengwei</organizationUrl>
</developer>
</developers>
......
......@@ -78,7 +78,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate
│   └── mysql
│   ├── docker-compose.yml
│   └── sql
│   └── xfg-frame-archetype.sql
│   └── big_market.sql
├── pom.xml
├── xfg-ddd-app
│   ├── Dockerfile
......
/**
* 数据传输对象 xxxRequestDTO xxxResponseDTO
*/
package cn.bugstack.api.dto;
\ No newline at end of file
/**
* 定义api接口
*/
package cn.bugstack.api;
\ No newline at end of file
/**
* HTTP 接口服务
*/
package cn.bugstack.trigger.http;
\ No newline at end of file
/**
* 任务服务,可以选择使用 Spring 默认提供的 Schedule https://bugstack.cn/md/road-map/quartz.html
*/
package cn.bugstack.trigger.job;
\ No newline at end of file
/**
* 监听服务;在单体服务中,解耦流程。类似MQ的使用,如Spring的Event,Guava的事件总线都可以。如果使用了 Redis 那么也可以有发布/订阅使用。
* Guava:https://bugstack.cn/md/road-map/guava.html
*/
package cn.bugstack.trigger.listener;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册