Create spring-boot-sendgrid module

Closes gh-46111
This commit is contained in:
Moritz Halbritter 2025-03-25 12:19:13 +01:00 committed by Andy Wilkinson
parent 637ee8b7f2
commit 9aff22d98f
11 changed files with 48 additions and 8 deletions

View File

@ -99,6 +99,7 @@ include "spring-boot-project:spring-boot-quartz"
include "spring-boot-project:spring-boot-r2dbc" include "spring-boot-project:spring-boot-r2dbc"
include "spring-boot-project:spring-boot-reactor-netty" include "spring-boot-project:spring-boot-reactor-netty"
include "spring-boot-project:spring-boot-rsocket" 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"
include "spring-boot-project:spring-boot-test-autoconfigure" include "spring-boot-project:spring-boot-test-autoconfigure"
include "spring-boot-project:spring-boot-test-integration-tests" include "spring-boot-project:spring-boot-test-integration-tests"

View File

@ -120,7 +120,6 @@ dependencies {
optional("org.apiguardian:apiguardian-api") optional("org.apiguardian:apiguardian-api")
optional("org.eclipse.angus:angus-mail") optional("org.eclipse.angus:angus-mail")
optional("com.github.ben-manes.caffeine:caffeine") optional("com.github.ben-manes.caffeine:caffeine")
optional("com.sendgrid:sendgrid-java")
optional("com.zaxxer:HikariCP") optional("com.zaxxer:HikariCP")
optional("org.aspectj:aspectjweaver") optional("org.aspectj:aspectjweaver")
optional("org.cache2k:cache2k-spring") 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.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerJwtAutoConfiguration 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.session.SessionAutoConfiguration
org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration
org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration

View File

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

View File

@ -110,6 +110,7 @@ dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata")) 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-reactor-netty", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-rsocket", 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-testcontainers", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata"))
@ -154,6 +155,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata")) 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-reactor-netty", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-rsocket", 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-test-autoconfigure", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "configurationPropertiesMetadata"))

View File

@ -0,0 +1,37 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.sendgrid; package org.springframework.boot.sendgrid.autoconfigure;
import com.sendgrid.Client; import com.sendgrid.Client;
import com.sendgrid.SendGrid; import com.sendgrid.SendGrid;
@ -36,7 +36,7 @@ import org.springframework.context.annotation.Bean;
* @author Maciej Walkowiak * @author Maciej Walkowiak
* @author Patrick Bray * @author Patrick Bray
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.3.0 * @since 4.0.0
*/ */
@AutoConfiguration @AutoConfiguration
@ConditionalOnClass(SendGrid.class) @ConditionalOnClass(SendGrid.class)

View File

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

View File

@ -17,4 +17,4 @@
/** /**
* Auto-configuration for SendGrid. * 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

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.sendgrid; package org.springframework.boot.sendgrid.autoconfigure;
import com.sendgrid.SendGrid; import com.sendgrid.SendGrid;
import org.apache.http.impl.conn.DefaultProxyRoutePlanner; import org.apache.http.impl.conn.DefaultProxyRoutePlanner;