spring-data-dynamodb icon indicating copy to clipboard operation
spring-data-dynamodb copied to clipboard

Provide autoconfiguration similar to other spring data projects

Open vasilievip opened this issue 6 years ago • 4 comments

So, users do not need to copy and paste boilerplate from project to project

Examples:

https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data

vasilievip avatar Oct 22 '18 17:10 vasilievip

To a certain extend I do not want to add Spring-Boot as a dependency itself to allow people to opt-in for Spring Boot (or not) which limits the options. But part of the work for #17 things should get a way easier to start with.

derjust avatar Nov 14 '18 13:11 derjust

you can add it as optional maven dependency + separate package, so, if people use spring-boot then it will work, if there is no spring boot in classpath - no issues, it will just be ignored

Compare these 2 cases:

  • spring-data-neo4j (everyting is autoconfigured) https://github.com/Playtika/testcontainers-spring-boot/blob/develop/embedded-neo4j/src/test/java/com/playtika/test/neo4j/EmbeddedNeo4JBootstrapConfigurationTest.java

  • spring-data-dynamodb (everything is copy-pasted from your samples:) https://github.com/Playtika/testcontainers-spring-boot/blob/develop/embedded-dynamodb/src/test/java/com/playtika/test/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java https://github.com/Playtika/testcontainers-spring-boot/blob/develop/embedded-dynamodb/src/test/java/com/playtika/test/dynamodb/springdata/DynamoDBConfig.java

vasilievip avatar Nov 14 '18 14:11 vasilievip

Thanks for the links - yes it will be definitely not adding new spring-boot dependencies here but be a (even small) new artifact

derjust avatar Jan 23 '19 04:01 derjust

Duplicated by #128

derjust avatar Jan 23 '19 04:01 derjust