-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
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,21 @@ | ||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter' | ||
api project(":stores:adapot") | ||
|
||
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" | ||
} | ||
|
||
tasks.named('compileJava') { | ||
inputs.files(tasks.named('processResources')) | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'Yaci AdaPot Store Spring Boot Starter' | ||
description = 'Yaci AdaPot Store Spring Boot Starter' | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...ain/java/com/bloxbean/cardano/yaci/store/starter/adapot/AdaPotStoreAutoConfiguration.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,18 @@ | ||
package com.bloxbean.cardano.yaci.store.starter.adapot; | ||
|
||
import com.bloxbean.cardano.yaci.store.adapot.AdaPotStoreConfiguration; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.AutoConfiguration; | ||
import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@AutoConfiguration | ||
@EnableConfigurationProperties(AdaPotStoreProperties.class) | ||
@Import(AdaPotStoreConfiguration.class) | ||
@Slf4j | ||
public class AdaPotStoreAutoConfiguration { | ||
|
||
@Autowired | ||
AdaPotStoreProperties properties; | ||
} |
19 changes: 19 additions & 0 deletions
19
...r/src/main/java/com/bloxbean/cardano/yaci/store/starter/adapot/AdaPotStoreProperties.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,19 @@ | ||
package com.bloxbean.cardano.yaci.store.starter.adapot; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Getter | ||
@Setter | ||
@ConfigurationProperties(prefix = "store", ignoreUnknownFields = true) | ||
public class AdaPotStoreProperties { | ||
private AdaPot adaPot; | ||
|
||
@Getter | ||
@Setter | ||
public static final class AdaPot { | ||
private boolean enabled = true; | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
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 @@ | ||
com.bloxbean.cardano.yaci.store.starter.adaport.AdaPotStoreAutoConfiguration |
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,17 @@ | ||
dependencies { | ||
api project(":components:common") | ||
api project(":components:events") | ||
|
||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'Yaci Store AdaPot Module' | ||
description = 'Yaci Store AdaPot Module' | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...adapot/src/main/java/com/bloxbean/cardano/yaci/store/adapot/AdaPotStoreConfiguration.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,22 @@ | ||
package com.bloxbean.cardano.yaci.store.adapot; | ||
|
||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.boot.autoconfigure.domain.EntityScan; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; | ||
import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
|
||
@Configuration | ||
@ConditionalOnProperty( | ||
prefix = "store.adapot", | ||
name = "enabled", | ||
havingValue = "true", | ||
matchIfMissing = true | ||
) | ||
@ComponentScan(basePackages = {"com.bloxbean.cardano.yaci.store.adapot"}) | ||
@EnableJpaRepositories( basePackages = {"com.bloxbean.cardano.yaci.store.adapot"}) | ||
@EntityScan(basePackages = {"com.bloxbean.cardano.yaci.store.adapot"}) | ||
@EnableTransactionManagement | ||
public class AdaPotStoreConfiguration { | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.