开源API网关-ApacheShenYu首次按照启动遇到的问题

一.背景

公司有API网关产品需求,希望有图形化的后台管理功能。看到了ApacheShenYu,作为Apache的顶级项目,直接认可了。首先,感谢各位大神的付出,初步看这个项目是国内大厂中的大神创立的,在此表示膜拜!

二.下载及参考文档

版本选择:建议2.6.x

数据库选择:MySQL

部署方式:我选择的是二进制包部署。二进制包部署 | Apache ShenYu,右上角可以切换中英文哈。

下载内容:

1.Apache ShenYu Admin

https://archive.apache.org/dist/shenyu/2.6.0/apache-shenyu-2.6.0-admin-bin.tar.gz

2.MySQL驱动

https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.18/mysql-connector-java-8.0.18.jar

3.Apache ShenYu Bootstrap

https://archive.apache.org/dist/shenyu/2.6.0/apache-shenyu-2.6.0-bootstrap-bin.tar.gz

按照文档步骤操作,应该没有问题。*注意*,先操作文档左侧中的"部署先决条件",主要就是数据库初始化。

三.老版本2.4.1文档部署遇到的问题

在这里不是为了找茬,就是记录根据文档快速上手遇到的问题。新版本2.6.x的文档好多了。对于初学者的友好度还需提升。大神们不要喷我。

1.莫名打开了2.4.1的文档,开启了上手的路

2.下载后启动莫名结束

D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin>start.bat
Starting the ShenYu-Admin ...
08:43:39,856 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
08:43:39,856 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/conf/logback.xml]
08:43:39,944 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
08:43:39,945 |-INFO in ch.qos.logback.core.joran.action.ShutdownHookAction - About to instantiate shutdown hook of type [ch.qos.logback.core.hook.DelayingShutdownHook]
08:43:39,947 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
08:43:39,967 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
08:43:39,969 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
08:43:39,978 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1182461167 - setting totalSizeCap to 10 GB
08:43:39,980 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1182461167 - Archive files will be limited to [100 MB] each.
08:43:39,986 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1182461167 - Will use zip compression
08:43:39,987 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1182461167 - Will use the pattern D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}.%i.log for the active file
08:43:39,989 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@612679d6 - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}.%i.log.zip'.
08:43:39,989 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@612679d6 - Roll-over at midnight.
08:43:39,991 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@612679d6 - Setting initial period to Tue Jun 25 08:40:32 CST 2024
08:43:39,993 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:43:40,002 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin.log
08:43:40,002 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin.log]
08:43:40,006 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:43:40,008 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_FILE]
08:43:40,008 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_FILE]
08:43:40,008 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Attaching appender named [FILE] to AsyncAppender.
08:43:40,009 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Setting discardingThreshold to 0
08:43:40,009 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
08:43:40,009 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ERROR_FILE]
08:43:40,010 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1832580921 - setting totalSizeCap to 10 GB
08:43:40,011 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1832580921 - Archive files will be limited to [100 MB] each.
08:43:40,011 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1832580921 - Will use zip compression
08:43:40,011 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1832580921 - Will use the pattern D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}-error.%i.log for the active file
08:43:40,012 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1da51a35 - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}-error.%i.log.zip'.
08:43:40,012 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1da51a35 - Roll-over at midnight.
08:43:40,012 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1da51a35 - Setting initial period to Tue Jun 25 08:40:32 CST 2024
08:43:40,013 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:43:40,013 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - Active log file name: D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin-error.log
08:43:40,013 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - File property is set to [D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin-error.log]
08:43:40,014 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:43:40,014 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_ERROR_FILE]
08:43:40,014 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ERROR_FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE]
08:43:40,014 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Attaching appender named [ERROR_FILE] to AsyncAppender.
08:43:40,014 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Setting discardingThreshold to 0
08:43:40,015 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
08:43:40,017 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_FILE] to Logger[ROOT]
08:43:40,017 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_ERROR_FILE] to Logger[ROOT]
08:43:40,017 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
08:43:40,017 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@44a3ec6b - Registering current configuration as safe fallback point
08:43:40,419 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Worker thread will flush remaining events before exiting.
08:43:40,420 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Queue flush finished successfully within timeout.
08:43:40,421 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Worker thread will flush remaining events before exiting.
08:43:40,421 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Queue flush finished successfully within timeout.
08:43:40,432 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
08:43:40,432 |-INFO in ch.qos.logback.core.joran.action.ShutdownHookAction - About to instantiate shutdown hook of type [ch.qos.logback.core.hook.DelayingShutdownHook]
08:43:40,432 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
08:43:40,433 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
08:43:40,433 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
08:43:40,434 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@322561962 - setting totalSizeCap to 10 GB
08:43:40,434 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@322561962 - Archive files will be limited to [100 MB] each.
08:43:40,434 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@322561962 - Will use zip compression
08:43:40,435 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@322561962 - Will use the pattern D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}.%i.log for the active file
08:43:40,435 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1fb669c3 - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}.%i.log.zip'.
08:43:40,435 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1fb669c3 - Roll-over at midnight.
08:43:40,436 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@1fb669c3 - Setting initial period to Tue Jun 25 08:40:32 CST 2024
08:43:40,437 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:43:40,438 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin.log
08:43:40,438 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin.log]
08:43:40,439 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:43:40,439 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_FILE]
08:43:40,439 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_FILE]
08:43:40,439 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Attaching appender named [FILE] to AsyncAppender.
08:43:40,439 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Setting discardingThreshold to 0
08:43:40,440 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
08:43:40,440 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ERROR_FILE]
08:43:40,440 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1237740254 - setting totalSizeCap to 10 GB
08:43:40,441 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1237740254 - Archive files will be limited to [100 MB] each.
08:43:40,441 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1237740254 - Will use zip compression
08:43:40,441 |-INFO in c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1237740254 - Will use the pattern D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}-error.%i.log for the active file
08:43:40,441 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6239aba6 - The date pattern is 'yyyy-MM-dd' from file name pattern 'D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/bin//../logs/shenyu-admin.%d{yyyy-MM-dd}-error.%i.log.zip'.
08:43:40,441 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6239aba6 - Roll-over at midnight.
08:43:40,442 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6239aba6 - Setting initial period to Tue Jun 25 08:40:32 CST 2024
08:43:40,442 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:43:40,443 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - Active log file name: D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin-error.log
08:43:40,443 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_FILE] - File property is set to [D:\zsp\works\study\ApacheShenYu\apache-shenyu-2.6.1-admin-bin\bin\/../logs/shenyu-admin-error.log]
08:43:40,443 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:43:40,443 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNC_ERROR_FILE]
08:43:40,443 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ERROR_FILE] to ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE]
08:43:40,443 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Attaching appender named [ERROR_FILE] to AsyncAppender.
08:43:40,444 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Setting discardingThreshold to 0
08:43:40,444 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
08:43:40,444 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@3e6104fc - Propagating INFO level on Logger[ROOT] onto the JUL framework
08:43:40,445 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_FILE] to Logger[ROOT]
08:43:40,445 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNC_ERROR_FILE] to Logger[ROOT]
08:43:40,445 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
08:43:40,445 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@7164ca4c - Registering current configuration as safe fallback point
08:43:40,450 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@3e6104fc - Propagating INFO level on Logger[org.springframework.boot] onto the JUL framework
08:43:40,450 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@3e6104fc - Propagating INFO level on Logger[org.apache.ibatis] onto the JUL framework
08:43:40,450 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@3e6104fc - Propagating INFO level on Logger[org.apache.shenyu.bonuspoint] onto the JUL framework
08:43:40,450 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@3e6104fc - Propagating INFO level on Logger[org.apache.shenyu.lottery] onto the JUL framework
08:43:40,451 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@3e6104fc - Propagating INFO level on Logger[org.apache.shenyu] onto the JUL framework

  ______   __                    ____  ____                 Profile: mysql
.' ____ \  | |                  |_  _||_  _|                Name: ShenYu Admin
| (___ \_| | |--.  .---.  _ .--.  \ \  [ ] _   _            Port: 9095
 _.____`.  | .-. |/ /__\\[ `.-. |  \ \/ / [ | | |           Pid: 21224
| \____) | | | | || \__., | | | |  _|  |_ | \_/ |,          SpringBoot Version: 2.7.17
 \______.'[___]|__]'.__.'[___||__]|______|'.__.'_/          ShenYu Version: 2.6.1

08:43:44,845 |-INFO in ch.qos.logback.core.hook.DelayingShutdownHook@3b361fc7 - Sleeping for 0 milliseconds
08:43:44,845 |-INFO in ch.qos.logback.core.hook.DelayingShutdownHook@3b361fc7 - Logback context being closed via shutdown hook
08:43:44,846 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Worker thread will flush remaining events before exiting.
08:43:44,846 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_ERROR_FILE] - Worker thread will flush remaining events before exiting.
08:43:44,847 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC_FILE] - Queue flush finished successfully within timeout.
请按任意键继续. . .

3.查看日志文件是没有数据库表

2024-06-25 08:40:32 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'upstreamCheckService' defined in URL [jar:file:/D:/zsp/works/study/ApacheShenYu/apache-shenyu-2.6.1-admin-bin/lib/shenyu-admin-2.6.1.jar!/org/apache/shenyu/admin/service/impl/UpstreamCheckService.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shenyu.admin.service.impl.UpstreamCheckService]: Constructor threw exception; nested exception is org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Table 'shenyu.plugin' doesn't exist
### The error may exist in class path resource [mappers/plugin-sqlmap.xml]
### The error may involve org.apache.shenyu.admin.mapper.PluginMapper.selectByNames-Inline
### The error occurred while setting parameters
### SQL: SELECT                          id,         date_created,         date_updated,         name,         config,         role,         sort,         plugin_jar,         enabled                 FROM plugin          WHERE name IN          (               ?          ,              ?          ,              ?          ,              ?          ,              ?          )
### Cause: java.sql.SQLSyntaxErrorException: Table 'shenyu.plugin' doesn't exist
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'shenyu.plugin' doesn't exist
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:310)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:291)
	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.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
	at org.apache.shenyu.admin.ShenyuAdminBootstrap.main(ShenyuAdminBootstrap.java:36)

4.文档没有写,自己反编译找到了初始化sql

5.发现sql文件中的2个错误

-- ----------------------------
-- Table structure for operation_record_log
-- ----------------------------
CREATE TABLE IF NOT EXISTS `operation_record_log`
(
    `id`             bigint       NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'id',
    `color`          varchar(20)  NOT NULL COMMENT 'log color',
    `context`        text         NOT NULL COMMENT 'log context',
    `operator`       varchar(200) NOT NULL COMMENT 'operator [user or app]]',
    `operation_time` datetime     NOT NULL DEFAULT now() COMMENT 'operation time',
    `operation_type` varchar(60)  NOT NULL DEFAULT 'update' COMMENT 'operation type
);

operation_type字段最后少了个单引号。

-- ----------------------------
-- Table structure for alert_template
-- ----------------------------
CREATE TABLE IF NOT EXISTS `alert_template`
(
    `id`            bigint          NOT NULL AUTO_INCREMENT COMMENT 'primary key id',
    `name`          varchar(255)    NOT NULL COMMENT 'alert template name',
    `strategy_name` varchar(255)    NOT NULL COMMENT 'alert template strategy name',
    `content`       varchar(1000)   NOT NULL COMMENT 'alert template content',
    `date_created`  timestamp       NOT NULL DEFAULT now() COMMENT 'create time',
    `date_updated`  timestamp       NOT NULL DEFAULT now() COMMENT 'update time'
);

id描述缺失报错,应该修改为

 `id`            bigint          NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'primary key id',

6.启动成功了不知道帐号密码

启动后,打开http://localhost:9095,帐号密码是 admin和123456

这些信息。文档中也不算友好,对于初学者,不好找。

首页登录后,要求修改初始密码。

相关推荐
s甜甜的学习之旅14 小时前
Apache POI练习代码
apache
是小崔啊14 小时前
开源轮子 - Apache Common
java·开源·apache
程序猿阿伟20 小时前
《探索 Apache Spark MLlib 与 Java 结合的卓越之道》
java·spark-ml·apache
Json_181790144801 天前
淘系商品评论json数据示例参考,API接口系列
大数据·json·api
开心工作室_kaic1 天前
springboot461学生成绩分析和弱项辅助系统设计(论文+源码)_kaic
开发语言·数据库·vue.js·php·apache
cr.sheeper1 天前
Vulnhub靶场Apache解析漏洞
网络安全·apache
北京_宏哥2 天前
python接口自动化(三十五)-封装与调用--流程类接口关联(详解)
前端·python·api
Marx82012 天前
英语尬面后,我做了一个生成英语学习视频的小工具
前端·面试·产品
ccc_9wy2 天前
Apache Solr RCE(CVE-2017-12629)--vulhub
apache·solr·lucene·burp suite·vulhub·远程命令执行漏洞rce·cve-2017-12629
ccc_9wy2 天前
Apache Solr RCE(CVE-2019-0193)--vulhub
网络安全·apache·solr·lucene·vulhub·cve-2019-0193·远程命令执行漏洞rce