Giter Site home page Giter Site logo

demo-devex's Introduction

OpenLiberty Developer Experience Demo

Build Status License

Demo highlights

  1. Liberty "dev mode"
  2. MicroShed Boost
  3. MicroShed Testing

How to run:

# One time setup
./setup.sh

mvn install

Scenarios

Dev mode

  1. Start dev mode with: mvn liberty:dev
Hot deployment
  1. In a browser, go to http://localhost:9080/openapi/ui to view the OpenAPI UI which is now available.

  2. In the Java file src/main/java/org/eclipse/microprofile/system/test/app/PersonService.java, add the following annotations above the getAllPeople() method:

    @APIResponse(
        responseCode = "200",
        description = "All of people that have been added.",
        content = @Content(
            mediaType = "application/json",
            schema = @Schema(
                type = SchemaType.OBJECT,
                implementation = Person.class)))
    @Operation(
        summary = "Get all people.",
        description = "Returns all of the people that have been added.")
  1. Save the file. Notice the console shows compilation errors because imports were not added.

  2. Add the following imports:

import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.enums.SchemaType;
import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
  1. Save the file. Notice the console shows compilation was successful and the application gets updated.

  2. In a browser, go to http://localhost:9080/openapi/ui, expand GET /people, and notice the summary, description, and 200 response code which has been added.

Hot testing
  1. Above the method getAllPeople(), delete the @GET annotation.

  2. Save the file. Notice the console shows compilation was successful.

  3. In the console, press Enter to run tests. Notice a test has an error.

  4. Above the method getAllPeople(), restore the @GET annotation.

  5. Save the file. Notice the console shows compilation was successful.

  6. In the console, press Enter to run tests. Notice the tests pass.

Hot debugging
  1. Inside the method getAllPeople(), set a breakpoint.

  2. In your IDE, attach a debugger to port 7777.

  3. In your browser, go to http://localhost:9080/myservice/people.

  4. Notice your IDE pauses at the breakpoint that you set, allowing you to debug.

  5. Disconnect the debugger.

Database support with Boost

  1. ...

MicroShed Testing

  1. Write tests with MicoShed Testing ...

demo-devex's People

Contributors

aguibert avatar ajm01 avatar ericglau avatar scottkurz avatar yeekangc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.