Skip to content

Instantly share code, notes, and snippets.

@iocanel
Created June 16, 2015 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iocanel/544e13145037aece4b1e to your computer and use it in GitHub Desktop.
Save iocanel/544e13145037aece4b1e to your computer and use it in GitHub Desktop.
Mysql example with alias
import javax.inject.Inject;
import io.fabric8.annotations.Protocol;
import io.fabric8.annotations.ServiceName;
public class MysqlExampleWithAlias {
public MysqlExampleWithAlias(@Inject @Alias("mysqldb") @ServiceName("mysql") String serivceUrl) {
System.out.println("Bean Name: mysqldb. Type: String. Value:"+serviceUrl);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment