/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.demo;

/**
 *
 * @author hyl
 */
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Default;

@RequestScoped
@Default
public class HelloBean implements HelloInterface {

    public String greeting() {
        return "Hello!";
    }

    @PostConstruct
    public void init() {
        System.out.println("Creating...");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("Destroying...");
    }
}
