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
def as_html(func): | |
def wrapper(): | |
result = func() | |
return f'<html>{result}</html>' | |
return wrapper | |
def say_hello(): | |
return 'Hello' |
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 tech.donau.quarkify; | |
import org.graalvm.polyglot.Context; | |
import org.graalvm.polyglot.Source; | |
import org.graalvm.polyglot.Value; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; |
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 tech.donau.quarkify; | |
import org.graalvm.polyglot.Context; | |
import org.graalvm.polyglot.Source; | |
import org.graalvm.polyglot.Value; | |
import javax.ws.rs.POST; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; |
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 tech.donau.quarkify; | |
import org.graalvm.polyglot.*; | |
import javax.ws.rs.*; | |
import javax.ws.rs.core.MediaType; | |
import java.io.IOException; | |
import java.net.URL; | |
@Path("/cooling") |
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 tech.donau.quarkify; | |
import io.quarkus.runtime.StartupEvent; | |
import org.graalvm.polyglot.*; | |
import javax.enterprise.event.Observes; | |
import javax.ws.rs.*; | |
import javax.ws.rs.core.MediaType; | |
import java.io.IOException; | |
import java.net.URL; |
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.acme.getting.started; | |
import io.quarkus.runtime.QuarkusApplication; | |
import io.quarkus.runtime.annotations.QuarkusMain; | |
import org.jboss.logging.Logger; | |
@QuarkusMain | |
public class GreetingApplication implements QuarkusApplication { | |
public static final Logger LOGGER = Logger.getLogger(GreetingApplication.class); |
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.acme.getting.started; | |
import io.quarkus.runtime.QuarkusApplication; | |
import io.quarkus.runtime.annotations.QuarkusMain; | |
import org.jboss.logging.Logger; | |
import javax.inject.Inject; | |
@QuarkusMain | |
public class GreetingApplication implements QuarkusApplication { | |
public static final Logger LOGGER = Logger.getLogger(GreetingApplication.class); |
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.acme.getting.started; | |
import io.quarkus.runtime.Quarkus; | |
import io.quarkus.runtime.QuarkusApplication; | |
import io.quarkus.runtime.annotations.QuarkusMain; | |
import org.jboss.logging.Logger; | |
import javax.inject.Inject; | |
@QuarkusMain | |
public class GreetingApplication implements QuarkusApplication { |
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.acme.getting.started.command; | |
import picocli.CommandLine; | |
@CommandLine.Command(subcommands = { | |
CommandLine.HelpCommand.class | |
// Put here more static commands, that don't require Dependency Injection | |
}) | |
public class QuarkusCommand { | |
} |
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.acme.getting.started.command; | |
import org.acme.getting.started.GreetingService; | |
import picocli.CommandLine; | |
import javax.enterprise.context.Dependent; | |
import javax.inject.Inject; | |
@Dependent | |
@CommandLine.Command(name = "greet", mixinStandardHelpOptions = true, description = "Greet person by their name") | |
public class GreetingCommand implements Runnable { |