Skip to content

Commit fb799d1

Browse files
committed
feat(spring): implement Spring Boot auto-configuration and full integration tests
- Add CozeLoopAutoConfiguration with conditional beans for CozeLoopClient and CozeTraceAspect - Support both token and JWT authentication mechanisms via properties - Enable configuration of HTTP, trace, and prompt cache settings through CozeLoopProperties - Create comprehensive unit tests covering various authentication scenarios and property configurations - Implement full integration tests validating client availability, span creation, and @CozeTrace annotation support - Add test utilities for resetting OpenTelemetry context between test runs - Verify Spring Boot 3.x compatibility with AutoConfiguration.imports mechanism - Ensure proper bean lifecycle management and shutdown handling
1 parent f7737ae commit fb799d1

97 files changed

Lines changed: 8796 additions & 108 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cozeloop-core/src/main/java/com/coze/loop/auth/Auth.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.auth;
52

63
/**

cozeloop-core/src/main/java/com/coze/loop/auth/JWTOAuthAuth.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.auth;
52

63
import com.coze.loop.exception.AuthException;

cozeloop-core/src/main/java/com/coze/loop/auth/TokenAuth.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.auth;
52

63
import com.coze.loop.exception.AuthException;

cozeloop-core/src/main/java/com/coze/loop/client/CozeLoopClient.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.client;
52

63
import com.coze.loop.entity.ExecuteParam;

cozeloop-core/src/main/java/com/coze/loop/client/CozeLoopClientBuilder.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.client;
52

63
import com.coze.loop.auth.Auth;

cozeloop-core/src/main/java/com/coze/loop/client/CozeLoopClientImpl.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.client;
52

63
import com.coze.loop.entity.ExecuteParam;

cozeloop-core/src/main/java/com/coze/loop/config/CozeLoopConfig.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.config;
52

63
import com.coze.loop.http.HttpConfig;

cozeloop-core/src/main/java/com/coze/loop/entity/ContentPart.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.entity;
52

63
import com.fasterxml.jackson.annotation.JsonProperty;

cozeloop-core/src/main/java/com/coze/loop/entity/ContentType.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.entity;
52

63
import com.fasterxml.jackson.annotation.JsonValue;

cozeloop-core/src/main/java/com/coze/loop/entity/ExecuteParam.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
2-
// SPDX-License-Identifier: MIT
3-
41
package com.coze.loop.entity;
52

63
import com.fasterxml.jackson.annotation.JsonProperty;

0 commit comments

Comments
 (0)