Skip to content

Instantly share code, notes, and snippets.

View ljnelson's full-sized avatar
🙃

Laird Nelson ljnelson

🙃
View GitHub Profile
mvn archetype:generate \
-DinteractiveMode=false \
-DarchetypeGroupId=io.helidon.archetypes \
-DarchetypeArtifactId=helidon-mp \
-DarchetypeVersion=2.0.0-M1 \
-DgroupId=io.helidon.example \
-DartifactId=helidon-jpa \
-Dpackage=io.helidon.example.jpa \
-DrestResourceName=ExampleResource \
-DapplicationName=ExampleApplication

A Test

It looks like you can publish Markdown to Medium.

We'll see about that.

What I'm mainly interested in is getting monospace (like every other developer on the planet).

That and codeblocks:

public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext);
public <T> T get(Contextual<T> contextual);
public T create(CreationalContext<T> creationalContext);
public void destroy(T instance, CreationalContext<T> creationalContext);
@ApplicationScoped
public class TransactionScopeLifecycleEventsTest {
private static boolean initializedObserved;
private AutoCloseable container;
@Before
public void setUp() throws Exception {
this.tearDown();
/*
* JBoss, Home of Professional Open Source.
* Copyright 2019, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
// Here's a neat way to ask an Application for its classes and singletons
// before the CDI container is up. That should let you register only those
// beans that should be registered.
private static final <T extends Application> void registerClassesAndSingletons(final AfterBeanDiscovery event,
final Bean<T> bean,
final BeanManager beanManager)
{
Objects.requireNonNull(event);
Objects.requireNonNull(bean);
@ljnelson
ljnelson / 05.pom.xml
Last active December 22, 2018 05:35
Example showing usage of microBean Weld environment
<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-weld-se-environment</artifactId>
<version>0.5.4-SNAPSHOT</version>
<type>pom</type>
<scope>runtime</scope> <!-- or test -->
</dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-weld-se-environment</artifactId>
<version>0.5.4-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<!-- Imports. -->
@ljnelson
ljnelson / 03.pom.xml
Last active December 22, 2018 02:24
Example showing abstract microBean environment
<groupId>org.microbean</groupId>
<artifactId>microbean-abstract-environment</artifactId>
<version>0.5.3-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<!-- Normal dependencies. -->