-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(multitenancy): Add web starter and autoconfiguration
Signed-off-by: Thomas Vitale <[email protected]>
- Loading branch information
1 parent
4b92d6f
commit 0a8e19c
Showing
37 changed files
with
894 additions
and
155 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
plugins { | ||
id 'code-quality-conventions' | ||
id 'java-conventions' | ||
id 'sbom-conventions' | ||
id 'release-conventions' | ||
} | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
} | ||
|
||
dependencies { | ||
annotationProcessor 'org.springframework.boot:spring-boot-autoconfigure-processor' | ||
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' | ||
|
||
implementation 'org.springframework.boot:spring-boot-starter' | ||
|
||
optional project(':arconia-core') | ||
optional project(':arconia-web') | ||
|
||
optional 'jakarta.servlet:jakarta.servlet-api' | ||
|
||
optional 'org.springframework:spring-context' | ||
optional 'org.springframework:spring-web' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = "Arconia Spring Boot Autoconfigure" | ||
description = "Arconia Spring Boot Autoconfigure." | ||
} | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...main/java/io/arconia/autoconfigure/core/multitenancy/FixedTenantResolutionProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package io.arconia.autoconfigure.core.multitenancy; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
import io.arconia.core.multitenancy.context.resolvers.FixedTenantResolver; | ||
|
||
/** | ||
* Configuration properties for fixed tenant resolution. | ||
* | ||
* @author Thomas Vitale | ||
*/ | ||
@ConfigurationProperties(prefix = FixedTenantResolutionProperties.CONFIG_PREFIX) | ||
public class FixedTenantResolutionProperties { | ||
|
||
public static final String CONFIG_PREFIX = "arconia.multitenancy.resolution.fixed"; | ||
|
||
/** | ||
* Whether a fixed tenant resolution strategy should be used. | ||
*/ | ||
private boolean enabled = false; | ||
|
||
/** | ||
* The name of the fixed tenant to use in each context. | ||
*/ | ||
private String tenantId = FixedTenantResolver.DEFAULT_FIXED_TENANT; | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
|
||
public void setEnabled(boolean enabled) { | ||
this.enabled = enabled; | ||
} | ||
|
||
public String getTenantId() { | ||
return tenantId; | ||
} | ||
|
||
public void setTenantId(String tenantId) { | ||
this.tenantId = tenantId; | ||
} | ||
|
||
} |
Oops, something went wrong.