Skip to content

Commit 5aaa5e1

Browse files
authored
remove hard coded password and use the one in the application config (#427)
1 parent 5e36af8 commit 5aaa5e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

grabdish/inventory-micronaut/src/main/java/io/micronaut/data/examples/InventoryServiceOrderEventConsumer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
package io.micronaut.data.examples;
1010

11+
import io.micronaut.context.annotation.Value;
12+
1113
//import com.fasterxml.jackson.databind.ObjectMapper;
1214
import org.json.JSONObject;
1315
import oracle.jdbc.OraclePreparedStatement;
@@ -30,7 +32,12 @@ public class InventoryServiceOrderEventConsumer implements Runnable {
3032
public static final String INVENTORYDOESNOTEXIST = "inventorydoesnotexist";
3133
private DataSource atpInventoryPDB;
3234
Connection dbConnection;
33-
String inventoryuser = "inventoryuser", inventorypw = "Welcome12345", orderQueueName = "ORDERQUEUE", inventoryQueueName = "INVENTORYQUEUE", queueOwner = "AQ";
35+
36+
@Value("${datasources.default.username}")
37+
String inventoryuser;
38+
@Value("${datasources.default.password}")
39+
String inventorypw;
40+
String orderQueueName = "ORDERQUEUE", inventoryQueueName = "INVENTORYQUEUE", queueOwner = "AQ";
3441

3542

3643
public InventoryServiceOrderEventConsumer(DataSource atpInventoryPDB) {

0 commit comments

Comments
 (0)