Skip to content

Commit

Permalink
fix build module-system
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenek-jonas committed Nov 8, 2023
1 parent db26c3a commit 61ddf8e
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 7 deletions.
20 changes: 20 additions & 0 deletions examples/spring-boot3-simple/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*-
* #%L
* spring-boot3-simple
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/
module spring.boot3.simple {
requires spring.context;
requires spring.boot.autoconfigure;
requires spring.boot;
requires org.eclipse.store.integrations.spring.boot;
requires spring.web;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package org.microstream.spring.boot.example;

/*-
* #%L
* spring-boot3-simple
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/

import org.eclipse.store.integrations.spring.boot.types.EclipseStoreSpringBoot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package org.microstream.spring.boot.example.controller;

/*-
* #%L
* spring-boot3-simple
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/

import org.microstream.spring.boot.example.service.JokesServices;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package org.microstream.spring.boot.example.model;

/*-
* #%L
* spring-boot3-simple
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/

import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
package org.microstream.spring.boot.example.service;

import org.eclipse.store.storage.embedded.types.EmbeddedStorageManager;
import org.microstream.spring.boot.example.model.Root;
/*-
* #%L
* spring-boot3-simple
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/

import org.microstream.spring.boot.example.storage.JokesStorage;
import org.springframework.stereotype.Service;
import org.springframework.util.ResourceUtils;
Expand All @@ -18,7 +30,8 @@ public class JokesServices
private final JokesStorage jokesStorage;


public String oneJoke(Integer id) {
public String oneJoke(Integer id)
{
String joke;
joke = jokesStorage.oneJoke(Objects.requireNonNullElse(id, 0));
return joke;
Expand All @@ -39,7 +52,8 @@ public Integer addNewJoke(String joke)
return jokesStorage.addNewJoke(joke);
}

public void loadPredefiniedJokes() {
public void loadPredefiniedJokes()
{
List<String> jokes = null;
try
{
Expand All @@ -49,9 +63,10 @@ public void loadPredefiniedJokes() {
{
throw new RuntimeException(e);
}
List<String> existingJokes = jokesStorage.allJokes();
if (existingJokes.containsAll(jokes)) {
return;
List<String> existingJokes = jokesStorage.allJokes();
if (existingJokes.containsAll(jokes))
{
return;
}
jokesStorage.addJokes(jokes);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package org.microstream.spring.boot.example.storage;

/*-
* #%L
* spring-boot3-simple
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/

import org.eclipse.store.storage.embedded.types.EmbeddedStorageManager;
import org.microstream.spring.boot.example.model.Root;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
package org.eclipse.store.integrations.spring.boot.types;

/*-
* #%L
* spring-boot3
* %%
* Copyright (C) 2023 MicroStream Software
* %%
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
* #L%
*/

import org.eclipse.store.storage.embedded.types.EmbeddedStorageManager;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down

0 comments on commit 61ddf8e

Please sign in to comment.