From e4a51ed9f8cc965cd9ca55fa773784c73064b98b Mon Sep 17 00:00:00 2001 From: Dave the Dev Date: Sat, 18 Apr 2026 15:05:51 +0000 Subject: [PATCH 1/6] Fix build by using buildscript pattern instead of plugin DSL --- build.gradle | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 1034cb7..06c54f5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,19 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.4.5' - id 'io.spring.dependency-management' version '1.1.7' +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:3.4.5") + } } +plugins { + id 'java' + id 'io.spring.dependency-management' version '1.1.7' +} + +apply plugin: 'org.springframework.boot' + group = 'com.hithomelabs' version = '0.0.1-SNAPSHOT' @@ -45,9 +55,10 @@ repositories { dependencies { implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.5' implementation group: 'org.springframework.boot', name:'spring-boot-starter-oauth2-client', version: '3.5.5' + implementation 'org.springframework.boot:spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok:1.18.30' annotationProcessor 'org.projectlombok:lombok:1.18.30' - implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' @@ -59,4 +70,4 @@ dependencies { tasks.named('test') { useJUnitPlatform() -} +} \ No newline at end of file -- 2.45.2 From 7fdfdacf500410b77f910ce93adf506742d187fa Mon Sep 17 00:00:00 2001 From: Dave the Dev Date: Sat, 18 Apr 2026 15:06:11 +0000 Subject: [PATCH 2/6] Fix by adding explicit import statements --- .../java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java b/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java index 42bacd5..bd64397 100644 --- a/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java +++ b/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java @@ -1,5 +1,8 @@ package com.hithomelabs.CFTunnels; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + /** * Main Spring Boot application class for Cloudflare Tunnels API. * @@ -42,4 +45,4 @@ public class CfTunnelsApplication { SpringApplication.run(CfTunnelsApplication.class, args); } -} +} \ No newline at end of file -- 2.45.2 From 6304c695772764f12e6088c3daaf8a2519e39cdd Mon Sep 17 00:00:00 2001 From: Dave the Dev Date: Sat, 18 Apr 2026 15:06:25 +0000 Subject: [PATCH 3/6] Fix ENV variable with default value --- src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 283d942..97344a4 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,7 +2,7 @@ spring.application.name=CFTunnels cloudflare.accountId=${CLOUDFLARE_ACCOUNT_ID} cloudflare.apiKey=${CLOUDFLARE_API_KEY} cloudflare.email=${CLOUDFLARE_EMAIL} -spring.profiles.active=${ENV} +spring.profiles.active=${ENV:default} / * * Masking sure app works behind a reverse proxy server.forward-headers-strategy=framework -- 2.45.2 From 29b767d634343a99e62a21592966df236a39a9d0 Mon Sep 17 00:00:00 2001 From: Dave the Dev Date: Sat, 18 Apr 2026 15:29:40 +0000 Subject: [PATCH 4/6] Hithomelabs/CFTunnels#114: Fix properties parser blocking issue Fixed the malformed comment in application.properties: - Changed "/ * * Masking" to "# Making" to create a valid comment - This was causing the properties parser to fail --- src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 97344a4..eb4ab8b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,7 +4,7 @@ cloudflare.apiKey=${CLOUDFLARE_API_KEY} cloudflare.email=${CLOUDFLARE_EMAIL} spring.profiles.active=${ENV:default} -/ * * Masking sure app works behind a reverse proxy +# Making sure app works behind a reverse proxy server.forward-headers-strategy=framework spring.security.oauth2.client.registration.cftunnels.client-id=${OAUTH_CLIENT_ID} -- 2.45.2 From 5ad6acbd008b74d78a7b71c0f2dfe5deb5cfcb8e Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Sat, 18 Apr 2026 22:15:53 +0530 Subject: [PATCH 5/6] Fixing breaking build due to import errors, Hithomelabs/CFTunnels#114 --- .gitignore | 1 + .../hithomelabs/CFTunnels/CfTunnelsApplication.java | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c47508c..3482e69 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ build/ !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ +CFTunnels/ ### STS ### .apt_generated diff --git a/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java b/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java index 42bacd5..32ef9f9 100644 --- a/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java +++ b/src/main/java/com/hithomelabs/CFTunnels/CfTunnelsApplication.java @@ -1,11 +1,13 @@ package com.hithomelabs.CFTunnels; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; /** * Main Spring Boot application class for Cloudflare Tunnels API. - * + * *

This application provides a RESTful API for managing Cloudflare Tunnels, * allowing users to create tunnel mappings to services with an approval workflow.

- * + * *

Features:

*
    *
  • Create, update, and delete Cloudflare tunnels
  • @@ -13,7 +15,7 @@ package com.hithomelabs.CFTunnels; *
  • Request/approval workflow for mapping changes
  • *
  • OIDC-based authentication with role-based access
  • *
- * + * *

Technology Stack:

*
    *
  • Java 17
  • @@ -23,10 +25,10 @@ package com.hithomelabs.CFTunnels; *
  • H2 Database (configurable for PostgreSQL)
  • *
  • Cloudflare API
  • *
- * + * *

Access the API documentation at: * {@code /swagger-ui.html} for the Swagger/OpenAPI UI

- * + * * @see Cloudflare Tunnel Documentation * @since 1.0.0 */ -- 2.45.2 From 9899e2648b187f060b75009897ac933cdf379f68 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Sat, 18 Apr 2026 22:53:32 +0530 Subject: [PATCH 6/6] Removing unnecessary agentic changes Hithomelabs/CFTunnels#114 --- build.gradle | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 06c54f5..3fc8ac4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,19 +1,9 @@ -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:3.4.5") - } -} - plugins { id 'java' + id 'org.springframework.boot' version '3.4.5' id 'io.spring.dependency-management' version '1.1.7' } -apply plugin: 'org.springframework.boot' - group = 'com.hithomelabs' version = '0.0.1-SNAPSHOT' @@ -55,7 +45,6 @@ repositories { dependencies { implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.5' implementation group: 'org.springframework.boot', name:'spring-boot-starter-oauth2-client', version: '3.5.5' - implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok:1.18.30' annotationProcessor 'org.projectlombok:lombok:1.18.30' -- 2.45.2