Create spring-boot-sendgrid module

This commit is contained in:
Moritz Halbritter
2025-03-25 12:19:13 +01:00
committed by Phillip Webb
parent 843867c0f4
commit 8561dd7680
11 changed files with 33 additions and 10 deletions

View File

@@ -83,6 +83,7 @@ include "spring-boot-project:spring-boot-quartz"
include "spring-boot-project:spring-boot-r2dbc"
include "spring-boot-project:spring-boot-reactor-netty"
include "spring-boot-project:spring-boot-rsocket"
include "spring-boot-project:spring-boot-sendgrid"
include "spring-boot-project:spring-boot-test"
include "spring-boot-project:spring-boot-test-autoconfigure"
include "spring-boot-project:spring-boot-test-integration-tests"

View File

@@ -103,7 +103,6 @@ dependencies {
optional("org.apiguardian:apiguardian-api")
optional("org.eclipse.angus:angus-mail")
optional("com.github.ben-manes.caffeine:caffeine")
optional("com.sendgrid:sendgrid-java")
optional("com.zaxxer:HikariCP")
optional("org.aspectj:aspectjweaver")
optional("org.cache2k:cache2k-spring")

View File

@@ -68,7 +68,6 @@ org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2Re
org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerJwtAutoConfiguration
org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration
org.springframework.boot.autoconfigure.session.SessionAutoConfiguration
org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration
org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration

View File

@@ -2020,6 +2020,7 @@ bom {
"spring-boot-r2dbc",
"spring-boot-reactor-netty",
"spring-boot-rsocket",
"spring-boot-sendgrid",
"spring-boot-starter",
"spring-boot-starter-activemq",
"spring-boot-starter-actuator",

View File

@@ -94,6 +94,7 @@ dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-sendgrid", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata"))
@@ -138,6 +139,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-sendgrid", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "configurationPropertiesMetadata"))

View File

@@ -0,0 +1,20 @@
plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot SendGrid"
dependencies {
api(project(":spring-boot-project:spring-boot"))
api("com.sendgrid:sendgrid-java")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testRuntimeOnly("ch.qos.logback:logback-classic")
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.sendgrid;
package org.springframework.boot.sendgrid.autoconfigure;
import com.sendgrid.Client;
import com.sendgrid.SendGrid;
@@ -36,7 +36,7 @@ import org.springframework.context.annotation.Bean;
* @author Maciej Walkowiak
* @author Patrick Bray
* @author Andy Wilkinson
* @since 1.3.0
* @since 4.0.0
*/
@AutoConfiguration
@ConditionalOnClass(SendGrid.class)

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.sendgrid;
package org.springframework.boot.sendgrid.autoconfigure;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -23,7 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*
* @author Maciej Walkowiak
* @author Andy Wilkinson
* @since 1.3.0
* @since 4.0.0
*/
@ConfigurationProperties("spring.sendgrid")
public class SendGridProperties {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,4 +17,4 @@
/**
* Auto-configuration for SendGrid.
*/
package org.springframework.boot.autoconfigure.sendgrid;
package org.springframework.boot.sendgrid.autoconfigure;

View File

@@ -0,0 +1 @@
org.springframework.boot.sendgrid.autoconfigure.SendGridAutoConfiguration

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.sendgrid;
package org.springframework.boot.sendgrid.autoconfigure;
import com.sendgrid.SendGrid;
import org.apache.http.impl.conn.DefaultProxyRoutePlanner;