Skip to content

Commit b40e955

Browse files
committed
Initial Commit for Exception Insight tool
1 parent 1b33824 commit b40e955

10 files changed

Lines changed: 91 additions & 36 deletions

File tree

.gitignore

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
1-
# Compiled class file
2-
*.class
1+
# Maven
2+
target/
3+
**/target/
34

4-
# Log file
5+
# Logs
56
*.log
67

7-
# BlueJ files
8-
*.ctxt
8+
# IDEs
9+
.idea/
10+
*.iml
11+
.vscode/
12+
.settings/
13+
.classpath
14+
.project
915

10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
16+
# OS
17+
.DS_Store
18+
Thumbs.db
1219

13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
20+
# Build tools
21+
.mvn/wrapper/maven-wrapper.jar
2122

22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
replay_pid*
23+
**/*.class
24+
**/*.jar
25+
**/*.war
26+
**/*.ear
2527

26-
.idea/
27-
/ai-swagger-spring-boot-starter/.mvn/
28-
/ai-swagger-spring-boot-starter/mvnw
29-
/ai-swagger-spring-boot-starter/mvnw.cmd
30-
/ai-swagger-spring-boot-starter/target/
31-
/ai-swagger-helper-starter/mvnw
32-
/ai-swagger-helper-starter/target/
33-
/ai-swagger-helper-starter/.mvn/
34-
/ai-swagger-helper-starter/ai-swagger-helper-starter.iml
35-
/ai-swagger-helper-starter/mvnw.cmd
28+
**/.env
29+
**/.env.*
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Getting Started
2+
3+
### Reference Documentation
4+
5+
For further reference, please consider the following sections:
6+
7+
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
8+
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/4.0.3/maven-plugin)
9+
* [Create an OCI image](https://docs.spring.io/spring-boot/4.0.3/maven-plugin/build-image.html)
10+
11+
### Maven Parent overrides
12+
13+
Due to Maven's design, elements are inherited from the parent POM to the project POM.
14+
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the
15+
parent.
16+
To prevent this, the project POM contains empty overrides for these elements.
17+
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
18+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>io.github.rexrk</groupId>
7+
<artifactId>ai-dev-tools</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>ai-exception-insights-starter</artifactId>
12+
<packaging>jar</packaging>
13+
14+
<name>ai-exception-insights-starter</name>
15+
<description>AI-powered Spring Boot starter for analyzing runtime exceptions and suggesting fixes during development.</description>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.springframework.boot</groupId>
20+
<artifactId>spring-boot-autoconfigure</artifactId>
21+
</dependency>
22+
23+
<dependency>
24+
<groupId>org.springframework.ai</groupId>
25+
<artifactId>spring-ai-starter-model-openai</artifactId>
26+
</dependency>
27+
</dependencies>
28+
29+
</project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package io.github.rexrk.autoconfigure;
2+
3+
public class AiExceptionInsightsAutoConfiguration {
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
io.github.rexrk.autoconfigure.AiExceptionInsightsAutoConfiguration
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spring:
2+
application:
3+
name: ai-exception-insights-starter

ai-swagger-helper-starter/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
<artifactId>spring-boot-autoconfigure</artifactId>
2626
</dependency>
2727

28+
<dependency>
29+
<groupId>org.springframework.ai</groupId>
30+
<artifactId>spring-ai-starter-model-openai</artifactId>
31+
</dependency>
32+
2833
<!-- Swagger UI (springdoc) -->
2934
<dependency>
3035
<groupId>org.springdoc</groupId>
@@ -39,11 +44,6 @@
3944
<optional>true</optional>
4045
</dependency>
4146

42-
<dependency>
43-
<groupId>org.springframework.ai</groupId>
44-
<artifactId>spring-ai-starter-model-openai</artifactId>
45-
</dependency>
46-
4747
<dependency>
4848
<groupId>com.fasterxml.jackson.core</groupId>
4949
<artifactId>jackson-databind</artifactId>

ai-swagger-helper-starter/src/main/java/io/github/rexrk/AiSwaggerHelperAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public RouterFunction<ServerResponse> aiSwaggerRoutes(
107107
AiSwaggerHelperController controller) {
108108

109109
return RouterFunctions.route()
110-
.POST("/ai-swagger/generate",
110+
.POST("/devtools/ai/request-body/generate",
111111
RequestPredicates.contentType(MediaType.APPLICATION_JSON),
112112
request -> {
113113
try {

ai-swagger-helper-starter/src/main/resources/static/ai-generate-body-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const AiGenerateBodyPlugin = (system) => {
8484
console.log("📝 Resolved schema:", resolvedSchema);
8585

8686
// Call Spring Boot backend
87-
const response = await fetch("/ai-swagger/generate", {
87+
const response = await fetch("/devtools/ai/request-body/generate", {
8888
method: "POST",
8989
headers: { "Content-Type": "application/json" },
9090
body: JSON.stringify({ schema: resolvedSchema })

demo-app/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@
2121
<version>2.8.14</version>
2222
</dependency>
2323

24-
<!-- YOUR STARTER -->
24+
<!-- All Starters -->
2525
<dependency>
2626
<groupId>io.github.rexrk</groupId>
2727
<artifactId>ai-swagger-helper-starter</artifactId>
2828
<version>0.0.1-SNAPSHOT</version>
2929
</dependency>
30+
31+
<dependency>
32+
<groupId>io.github.rexrk</groupId>
33+
<artifactId>ai-exception-insights-starter</artifactId>
34+
<version>0.0.1-SNAPSHOT</version>
35+
</dependency>
3036
</dependencies>
3137

3238
<build>

0 commit comments

Comments
 (0)