Browse Source

Merge pull request #8212 in CORE/base-third from bugfix/11.0 to release/11.0

* commit 'efbd428db64e4921e577595cf8d8fceb04867455':
  REPORT-90408【系统管理】迁移、启用数据库失败
  KERNEL-14292 fix: 添加领域模块注解
release/11.0
superman 2 years ago
parent
commit
48c23ff138
  1. 8
      fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java
  2. 28
      fine-skywalking-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceDomain.java

8
fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java

@ -650,11 +650,15 @@ public class InformationExtractorJdbcDatabaseMetaDataImpl implements Information
final int columnPosition = resultSet.getInt( "KEY_SEQ" ); final int columnPosition = resultSet.getInt( "KEY_SEQ" );
final int index = columnPosition - 1;
// Fill up the array list with nulls up to the desired index, because some JDBC drivers don't return results ordered by column position
while ( pkColumns.size() <= index ) {
pkColumns.add( null );
}
final Identifier columnIdentifier = DatabaseIdentifier.toIdentifier( final Identifier columnIdentifier = DatabaseIdentifier.toIdentifier(
resultSet.getString( "COLUMN_NAME" ) resultSet.getString( "COLUMN_NAME" )
); );
final ColumnInformation column = tableInformation.getColumn( columnIdentifier ); pkColumns.set( index, tableInformation.getColumn( columnIdentifier ) );
pkColumns.add( columnPosition-1, column );
} }
} }
finally { finally {

28
fine-skywalking-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceDomain.java

@ -0,0 +1,28 @@
package org.apache.skywalking.apm.toolkit.trace;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 用于标记模块或者领域, 配合{@link Trace}使用
*
* 若类和方法上同时定义方法上的优先
*
* {@link Trace#operationName()}为空, 最终生成的span名为:
* 领域名/简单类名#简单方法名
* 否则为:
* 领域名/operationName
*
* @author Elijah
* created on 2023-02-22
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface TraceDomain {
//领域名
String value() default "";
}
Loading…
Cancel
Save