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
datasources: | |
default: | |
url: jdbc:h2:mem:devDb | |
driverClassName: org.h2.Driver | |
username: sa | |
password: "" | |
dialect: H2 | |
jpa: | |
default: |
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
package com.medium.danieldiasjava.micronaut.basic.application; | |
import io.micronaut.runtime.Micronaut; | |
public class MicronautBasicApplication { | |
public static void main(String[] args) { | |
Micronaut.run(MicronautBasicApplication.class, args); | |
} | |
} |
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
package com.medium.danieldiasjava.micronaut.basic.controller; | |
import javax.inject.Inject; | |
import javax.validation.Valid; | |
import com.medium.danieldiasjava.micronaut.basic.model.Message; | |
import com.medium.danieldiasjava.micronaut.basic.model.Person; | |
import com.medium.danieldiasjava.micronaut.basic.repository.PersonRepository; | |
import io.micronaut.http.HttpResponse; |
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
package com.medium.danieldiasjava.micronaut.basic.repository; | |
import com.medium.danieldiasjava.micronaut.basic.model.Person; | |
import io.micronaut.data.annotation.Repository; | |
import io.micronaut.data.repository.CrudRepository; | |
@Repository | |
public interface PersonRepository extends CrudRepository<Person, Long> { } |
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
package com.medium.danieldiasjava.micronaut.basic.model; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.GenerationType; | |
import javax.persistence.Id; | |
import javax.validation.constraints.Min; | |
import javax.validation.constraints.NotEmpty; | |
import javax.validation.constraints.Size; |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.medium.danieldiasjava.micronaut.basic</groupId> | |
<artifactId>micronaut.basic</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>basic Project</name> | |
<description>basic Project</description> |
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
package com.medium.danieldiasjava.openwebeans.application; | |
import javax.enterprise.inject.spi.Bean; | |
import javax.enterprise.inject.spi.BeanManager; | |
import com.medium.danieldiasjava.openwebeans.controller.MyBean; | |
import org.apache.webbeans.config.WebBeansContext; | |
import org.apache.webbeans.spi.ContainerLifecycle; |
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
package com.medium.danieldiasjava.openwebeans.controller; | |
import javax.inject.Named; | |
@Named | |
public class MyBean { | |
public void getHelloBean(String name) { | |
System.out.println("Hello " + name + " the OpenWebBeans started successfully !"); | |
} |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.medium.danieldiasjava.openwebbean</groupId> | |
<artifactId>openwebbean</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>OpenWebBean CDI</name> | |
<description>openWebBeanCDI</description> |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.enterprise.context.ApplicationScoped; | |
import javax.inject.Inject; |
NewerOlder