62 Star 458 Fork 155

minbox-projects / minbox-logging

 / 详情

apiboot 2.3.7升级到2.3.8 ,Logging Admin 服务端无法正常启动,报错 org.minbox.framework.logging.admin.storage.LoggingStorage' that could not be found.

待办的
创建于  
2022-09-16 22:26

##报错信息
LoggingStorage' that could not be found

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-09-16 21:40:32.892 ERROR 21568 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method loggingAdminFactoryBean in org.minbox.framework.api.boot.autoconfigure.logging.admin.ApiBootLoggingAdminAutoConfiguration required a bean of type 'org.minbox.framework.logging.admin.storage.LoggingStorage' that could not be found.


Action:

Consider defining a bean of type 'org.minbox.framework.logging.admin.storage.LoggingStorage' in your configuration.


Process finished with exit code 1

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
	<groupId>com.study</groupId>
	<artifactId>cbrc-log-server</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>cbrc-log-server</name>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.3</version>
        <relativePath/>
    </parent>

    <properties>
        <java.version>1.8</java.version>
        <api.boot.version>2.3.8</api.boot.version>
    </properties>
	
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
		
        <!--ApiBoot Logging Admin-->
        <dependency>
            <groupId>org.minbox.framework</groupId>
            <artifactId>api-boot-starter-logging-admin</artifactId>
        </dependency>

        <!--ApiBoot MyBatis Enhance-->
        <dependency>
            <groupId>org.minbox.framework</groupId>
            <artifactId>api-boot-starter-mybatis-enhance</artifactId>
        </dependency>

        <!--Spring Security-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
        </dependency>
    </dependencies>
	
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <!--ApiBoot统一版本依赖-->
            <dependency>
                <groupId>org.minbox.framework</groupId>
                <artifactId>api-boot-dependencies</artifactId>
                <version>${api.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

yml

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.zaxxer.hikari.HikariDataSource
    username: root
    password: root
    url: jdbc:mysql://127.0.0.1:3306/api-boot-admin?characterEncoding=utf8&serverTimezone=Asia/Shanghai
  # 配置Spring Security安全用户
  security:
    user:
      name: logging-abc
      password: abc#logserver
# ApiBoot相关配置
api:
  boot:
    logging:
      admin:
        show-console-report-log: true
        format-console-log-json: true

springboot启动类

@SpringBootApplication
@EnableLoggingAdmin
public class ApiBootAdminLoggingServerApplication {
    /**
     * logger instance
     */
    static Logger logger = LoggerFactory.getLogger(ApiBootAdminLoggingServerApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(ApiBootAdminLoggingServerApplication.class, args);
        logger.info("{}服务启动成功.", "Logging Server");
    }
}

评论 (1)

randee 创建了任务

@randee 请配置api.boot.logging.admin.storage-away参数,取值:jdbc、mongo

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
665760 hengboy 1597847660 144381 xiongfeigit 1583765405
Java
1
https://gitee.com/minbox-projects/minbox-logging.git
git@gitee.com:minbox-projects/minbox-logging.git
minbox-projects
minbox-logging
minbox-logging

搜索帮助