This file contains hidden or 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
package com.example.test; | |
import java.util.Collection; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.stream.Collectors; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.context.annotation.Bean; |
This file contains hidden or 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
package org.dominokit.samples; | |
import elemental2.dom.HTMLDivElement; | |
import org.dominokit.domino.ui.forms.CheckBox; | |
import org.dominokit.domino.ui.forms.TextBox; | |
import org.dominokit.domino.ui.grid.flex.FlexDirection; | |
import org.dominokit.domino.ui.grid.flex.FlexItem; | |
import org.dominokit.domino.ui.grid.flex.FlexLayout; | |
import org.dominokit.domino.ui.utils.BaseDominoElement; |
This file contains hidden or 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
package com.github.lofi.client; | |
import static org.mockito.Mockito.doReturn; | |
... | |
import org.jboss.elemento.InputBuilder; | |
... | |
@ExtendWith(MockitoExtension.class) | |
@RunWith(JUnitPlatform.class) | |
class ProductCompositeTest { |
This file contains hidden or 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
package com.github.lofi.client; | |
import static org.jboss.elemento.Elements.br; | |
... | |
import java.util.logging.Logger; | |
... | |
@Singleton | |
public class ProductComposite { | |
private static Logger logger = Logger.getLogger(ProductComposite.class.getName()); |
This file contains hidden or 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
package com.github.lofi.client; | |
public class Product { | |
private final String id; | |
private final String name; | |
... | |
private Product(Builder productBuilder) { | |
this.id = productBuilder.id; | |
this.name = productBuilder.name; |
This file contains hidden or 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
package com.github.lofi.client; | |
import java.util.Optional; | |
import java.util.Set; | |
interface Repository<T> { | |
Optional<T> get(String id); | |
Set<T> get(); | |
void persist(T entity); | |
void remove(T entity); |
This file contains hidden or 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
package com.github.lofi.client; | |
import java.util.logging.Logger; | |
import javax.inject.Inject; | |
import javax.inject.Singleton; | |
@Singleton | |
public class ProductService { | |
private static Logger logger = Logger.getLogger(ProductService.class.getName()); | |
private ProductIdbRepository productRepository; |
This file contains hidden or 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
Spring Boot | Dagger2 | Explanation | |
---|---|---|---|
@Configuration | @Module | A class that provides or builds the objects' dependencies | |
@Bean | @Provides | Create the objects | |
@SpringBootApplication | @Component | Interface used to generate the injector for the entry point and serves as a bridge between dependency providers (@Module) and dependency users (@Inject) | |
@Component @Service | @Singleton | Marking the classes to be managed as Singleton by DI framework | |
@Scope | @Singleton or nothing | Scoping the objects | |
@Autowired | @Inject | Inject the object to the marked property or constructor |
This file contains hidden or 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
package com.github.lofi.client | |
import java.util.logging.Logger; | |
import com.google.gwt.core.client.EntryPoint; | |
public class AppEntryPoint implements EntryPoint { | |
private static Logger logger = Logger.getLogger(AppEntryPoint.class.getName()); | |
@Override | |
public void onModuleLoad() { |
This file contains hidden or 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
... | |
<build> | |
<plugins> | |
<!-- GWT Maven Plugin --> | |
<plugin> | |
<groupId>net.ltgt.gwt.maven</groupId> | |
<artifactId>gwt-maven-plugin</artifactId> | |
<configuration> | |
<moduleName> | |
com.github.lofi.Calculator |
NewerOlder