Qt---xxx.pro: Missing closing brace(s).

丢失了关闭括号

出现这个问题,可以找一下pro文件中是不是少括号了。

CONFIG(debug, debug|release) {
    TARGET = $$join(TARGET,,,d)
    ROUTDIR = $$PWD/../build/debug
} else {
    TARGET = $$join(TARGET,,,)
    ROUTDIR = $$PWD/../build/release

我本来是这么写的,然后出现了问题, 因为少了个'}'.

: Connection released: [id: 0][route: {}->http://192.168.12.59:6041][total kept alive: 1; route allocated: 1 of 20; total allocated: 1 of 200] 2025-08-29 09:54:39.783 DEBUG 21556 --- [ main] org.mybatis.spring.SqlSessionUtils : Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@68212585] 2025-08-29 09:54:39.925 DEBUG 21556 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loaded 11 bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] 2025-08-29 09:54:39.933 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'DB2' 2025-08-29 09:54:39.965 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'Derby' 2025-08-29 09:54:39.968 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'H2' 2025-08-29 09:54:39.970 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'HDB' 2025-08-29 09:54:39.977 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'HSQL' 2025-08-29 09:54:39.979 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'Informix' 2025-08-29 09:54:39.980 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'MS-SQL' 2025-08-29 09:54:39.983 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'MySQL' 2025-08-29 09:54:39.985 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'Oracle' 2025-08-29 09:54:39.988 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'PostgreSQL' 2025-08-29 09:54:39.991 DEBUG 21556 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'Sybase' 2025-08-29 09:54:39.994 DEBUG 21556 --- [ main] o.s.jdbc.support.SQLErrorCodesFactory : Looking up default SQLErrorCodes for DataSource [com.depower.datasource.config.DynamicDataSource@3596a9d5] 2025-08-29 09:54:39.994 DEBUG 21556 --- [ main] o.s.jdbc.datasource.DataSourceUtils : Fetching JDBC Connection from DataSource 2025-08-29 09:54:39.997 DEBUG 21556 --- [ main] o.s.jdbc.support.SQLErrorCodesFactory : SQL error codes for 'TDengine' not found 2025-08-29 09:54:39.998 DEBUG 21556 --- [ main] o.s.jdbc.support.SQLErrorCodesFactory : Caching SQL error codes for DataSource [com.depower.datasource.config.DynamicDataSource@3596a9d5]: database product name is 'TDengine' 2025-08-29 09:54:40.007 DEBUG 21556 --- [ main] s.j.s.SQLErrorCodeSQLExceptionTranslator : Unable to translate SQLException with Error code '537', will now try the fallback translator 2025-08-29 09:54:40.020 DEBUG 21556 --- [ main] c.d.datasource.aspect.DataSourceAspect : clean datasource
最新发布
08-30
你提供的日志信息是一个 Spring Boot 应用在运行过程中输出的调试信息,主要涉及以下几个方面: - HTTP 连接的释放(`Connection released`) - MyBatis 的 SqlSession 关闭 - Spring JDBC 错误码加载 - 数据源错误码解析(如 `SQLErrorCodesFactory`) - 数据源切换的 AOP 处理(`DataSourceAspect`) --- ## 问题分析 ### 1. `Connection released: [id: 0][route: {}->http://192.168.12.59:6041]` 这表示一个 HTTP 连接被释放回连接池。说明你使用了类似 `HttpClient` 或 `RestTemplate` 的组件去调用了远程服务(如微服务、API 接口),并且该请求已经完成,连接被关闭。 ```java // 示例:使用 RestTemplate 调用远程服务 ResponseEntity<String> response = restTemplate.getForEntity("http://192.168.12.59:6041/api", String.class); ``` ### 2. `Closing non transactional SqlSession` 这是 MyBatis 的日志,说明当前没有事务,SqlSession 被正常关闭。 ```java // MyBatis 使用示例 try (SqlSession session = sqlSessionFactory.openSession()) { MyMapper mapper = session.getMapper(MyMapper.class); List<User> users = mapper.selectAllUsers(); } ``` ### 3. `SQLErrorCodesFactory` 加载数据库错误码 Spring JDBC 会根据数据库类型加载对应的错误码映射,用于将底层数据库异常转换为 Spring 的 `DataAccessException`。你看到的: ``` SQL error codes for 'TDengine' not found ``` 说明 Spring 没有内置对 **TDengine** 数据库的错误码支持,因此它使用了默认的错误码处理方式。 ### 4. `DataSourceAspect` 清理数据源 这说明你使用了自定义的 AOP 切面来管理数据源切换(比如多数据源场景)。 ```java @Aspect @Component public class DataSourceAspect { @Before("execution(* com.depower.service..*.*(..)) && @annotation(ds))") public void beforeSwitchDataSource(JoinPoint point, DataSource ds) { String dsId = ds.value(); DynamicDataSourceContextHolder.push(dsId); } @After("execution(* com.depower.service..*.*(..)) && @annotation(ds))") public void afterSwitchDataSource(JoinPoint point, DataSource ds) { DynamicDataSourceContextHolder.poll(); } } ``` --- ## 总结:你看到的日志说明什么? - 你的 Spring Boot 应用正在运行一个集成测试或业务逻辑,涉及到: - HTTP 请求调用 - 数据库访问(使用了 MyBatis) - 多数据源切换(通过 AOP 实现) - 使用了 TDengine 数据库(Spring 未内置支持) 这些日志都属于调试信息,并非错误信息。如果你没有遇到运行时异常或功能错误,可以忽略这些日志。 --- ## 示例:如何为 TDengine 添加自定义错误码支持 你可以自定义 `sql-error-codes.xml` 文件来支持 TDengine 错误码: ```xml <!-- src/main/resources/sql-error-codes.xml --> <bean id="TDengine" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="badSqlGrammarCodes"> <value>537</value> <!-- 示例错误码 --> </property> <property name="duplicateKeyCodes"> <value>543</value> </property> </bean> ``` 然后在配置中启用: ```java @Configuration public class JdbcConfig { @Bean public SQLErrorCodeSQLExceptionTranslator sqlExceptionTranslator(DataSource dataSource) { return new SQLErrorCodeSQLExceptionTranslator(dataSource); } } ``` --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

伸头看云朵

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值