File tree Expand file tree Collapse file tree
spring-data-eclipse-store-demo
main/java/software/xdev/spring/data/eclipse/store/demo
java/software/xdev/spring/data/eclipse/store/demo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,3 +86,4 @@ storage-jpa
8686.idea /codeStyles /*
8787! .idea /codeStyles /codeStyleConfig.xml
8888! .idea /codeStyles /Project.xml
89+ /spring-data-eclipse-store-demo /storage-complex
Original file line number Diff line number Diff line change 6262 <groupId >org.springframework.boot</groupId >
6363 <artifactId >spring-boot-autoconfigure</artifactId >
6464 </dependency >
65+
66+
67+ <dependency >
68+ <groupId >org.junit.jupiter</groupId >
69+ <artifactId >junit-jupiter</artifactId >
70+ <scope >test</scope >
71+ </dependency >
72+ <dependency >
73+ <groupId >org.junit.jupiter</groupId >
74+ <artifactId >junit-jupiter</artifactId >
75+ <scope >test</scope >
76+ </dependency >
77+ <dependency >
78+ <groupId >org.junit.jupiter</groupId >
79+ <artifactId >junit-jupiter</artifactId >
80+ <scope >test</scope >
81+ </dependency >
82+ <dependency >
83+ <groupId >org.springframework.boot</groupId >
84+ <artifactId >spring-boot-starter-test</artifactId >
85+ <exclusions >
86+ <exclusion >
87+ <artifactId >spring-boot-starter-logging</artifactId >
88+ <groupId >org.springframework.boot</groupId >
89+ </exclusion >
90+ </exclusions >
91+ <scope >test</scope >
92+ </dependency >
6593 </dependencies >
6694
6795 <build >
88116 <jvmArguments >
89117 --add-opens java.base/java.util=ALL-UNNAMED
90118 --add-opens java.base/java.time=ALL-UNNAMED
119+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
91120 </jvmArguments >
92121 </configuration >
93122 </plugin >
123+ <plugin >
124+ <groupId >org.apache.maven.plugins</groupId >
125+ <artifactId >maven-surefire-plugin</artifactId >
126+ <version >3.3.0</version >
127+ <configuration >
128+ <argLine >
129+ --add-opens java.base/java.util=ALL-UNNAMED
130+ --add-opens java.base/java.time=ALL-UNNAMED
131+ --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
132+ </argLine >
133+ </configuration >
134+ </plugin >
94135 </plugins >
95136 </build >
96137</project >
Original file line number Diff line number Diff line change 11package software .xdev .spring .data .eclipse .store .demo .complex ;
22
3+ import java .nio .file .Path ;
4+
35import org .eclipse .store .integrations .spring .boot .types .configuration .EclipseStoreProperties ;
46import org .eclipse .store .integrations .spring .boot .types .factories .EmbeddedStorageFoundationFactory ;
7+ import org .eclipse .store .storage .embedded .types .EmbeddedStorage ;
8+ import org .eclipse .store .storage .embedded .types .EmbeddedStorageFoundation ;
9+ import org .eclipse .store .storage .types .Storage ;
510import org .springframework .beans .factory .ObjectProvider ;
611import org .springframework .beans .factory .annotation .Autowired ;
712import org .springframework .boot .autoconfigure .transaction .TransactionManagerCustomizers ;
@@ -26,6 +31,20 @@ public ComplexConfiguration(
2631 super (defaultEclipseStoreProperties , defaultEclipseStoreProvider );
2732 }
2833
34+ /**
35+ * This is one option how to configure the {@link EmbeddedStorageFoundation}.
36+ * <p>
37+ * We create a completely new foundation. That means that all configuration (e.g. properties) are not used here.
38+ * With this method you have complete control over the configuration.
39+ * </p>
40+ * Another example: {@link PersistencePersonConfiguration#createEmbeddedStorageFoundation()}
41+ */
42+ @ Override
43+ public EmbeddedStorageFoundation <?> createEmbeddedStorageFoundation ()
44+ {
45+ return EmbeddedStorage .Foundation (Storage .Configuration (Storage .FileProvider (Path .of ("storage-complex" ))));
46+ }
47+
2948 /**
3049 * Overriding {@link #transactionManager(ObjectProvider)} only to add the {@link Bean}-Annotation.
3150 */
Original file line number Diff line number Diff line change @@ -29,11 +29,10 @@ public class PersistencePersonConfiguration extends EclipseStoreClientConfigurat
2929 public PersistencePersonConfiguration (
3030 final EclipseStoreProperties defaultEclipseStoreProperties ,
3131 final EmbeddedStorageFoundationFactory defaultEclipseStoreProvider ,
32- final EmbeddedStorageFoundationFactory foundation ,
3332 final EclipseStoreProperties properties )
3433 {
3534 super (defaultEclipseStoreProperties , defaultEclipseStoreProvider );
36- this .foundation = foundation ;
35+ this .foundation = defaultEclipseStoreProvider ;
3736 this .properties = properties ;
3837 }
3938
Original file line number Diff line number Diff line change 1+ package software .xdev .spring .data .eclipse .store .demo .complex ;
2+
3+ import static org .junit .jupiter .api .Assertions .assertTrue ;
4+
5+ import org .junit .jupiter .api .Test ;
6+ import org .springframework .boot .test .context .SpringBootTest ;
7+
8+
9+ @ SpringBootTest (classes = ComplexDemoApplication .class )
10+ class ComplexDemoApplicationTest
11+ {
12+ @ Test
13+ void checkPossibilityToSimplyStartApplication ()
14+ {
15+ assertTrue (true );
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ package software .xdev .spring .data .eclipse .store .demo .simple ;
2+
3+ import static org .junit .jupiter .api .Assertions .assertTrue ;
4+
5+ import org .junit .jupiter .api .Test ;
6+ import org .springframework .boot .test .context .SpringBootTest ;
7+
8+
9+ @ SpringBootTest (classes = SimpleDemoApplication .class )
10+ class SimpleDemoApplicationTest
11+ {
12+ @ Test
13+ void checkPossibilityToSimplyStartApplication ()
14+ {
15+ assertTrue (true );
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ <Configuration name =" ConfigTest" status =" ERROR" monitorInterval =" 5" >
2+ <Appenders >
3+ <Console name =" Console" target =" SYSTEM_OUT" >
4+ <PatternLayout pattern =" %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
5+ </Console >
6+ </Appenders >
7+ <Loggers >
8+ <!-- <Logger name="software.xdev" level="debug"/>-->
9+ <Root level =" error" >
10+ <AppenderRef ref =" Console" />
11+ </Root >
12+ </Loggers >
13+ </Configuration >
You can’t perform that action at this time.
0 commit comments