发生异常: NotImplementedError Non-relative patterns are unsupported
时间: 2023-02-07 19:13:09 浏览: 292
NotImplementedError 是一个 Python 异常,意思是这个功能在当前版本中尚未实现。 Non-relative patterns are unsupported 意思是不支持非相对模式。
这个异常可能是由于你使用了不被支持的方法或功能引起的。你可以尝试查看代码,找出哪里出现了问题,然后修改代码以避免这个异常。
相关问题
server: port: 8080 spring: datasource: username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/db?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8 druid: initial-size: 5 min-idle: 5 max-active: 20 max-wait: 60000 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 100000 max-evictable-idle-time-millis: 300000 validation-query: SELECT 1 FROM DUAL test-while-idle: true test-on-borrow: false test-on-return: false pool-prepared-statements: true aop-patterns: com.example.demo.* stat-view-servlet: enabled: true login-username: root login-password: 123456 web-stat-filter: enabled: true url-pattern: /* exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' filters: stat,wall filter: stat: slow-sql-millis: 1000 log-slow-sql: true enabled: true wall: enabled: true config: drop-table-allow: false重写yml格式
我可以帮你重新格式化这段YAML格式的文本,如下所示:
```yaml
server:
port: 8080
spring:
datasource:
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/db?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 100000
max-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
aop-patterns: com.example.demo.*
stat-view-servlet:
enabled: true
login-username: root
login-password: 123456
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filters: stat,wall
filter:
stat:
slow-sql-millis: 1000
log-slow-sql: true
enabled: true
wall:
enabled: true
config:
drop-table-allow: false
```
希望这样的格式更易读和明了。如果你还有任何其他问题,请随时提问!
druid: aop-patterns: com.yqn.* filters: stat,wall stat-view-servlet: enabled: true login-username: admin login-password: admin web-stat-filter: enabled: true url-pattern: /* logging: level: com.yqn.mapper: debug
这是一个 YAML 格式的配置文件片段,描述了一个 Spring Boot 项目中的一些配置信息。其中:
- `druid` 部分配置了 Druid 数据源的相关信息,包括 AOP 切面、过滤器和统计监控等功能。`aop-patterns` 指定了对哪些类进行 AOP 切面处理,`filters` 指定了需要启用的过滤器,`stat-view-servlet` 和 `web-stat-filter` 分别指定了 Druid 监控的 Web UI 和 Web 过滤器。
- `logging` 部分配置了日志记录的相关信息,使用的日志级别是 `debug`。`com.yqn.mapper` 是一个包名,表示只对这个包下的 Mapper 接口进行详细的调试日志记录。
以上是对该配置文件片段的简要解释,如果您需要更详细的解释或有其他问题,请随时提出。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)