minor formatting work
This commit is contained in:
@@ -7,15 +7,15 @@ import java.util.UUID;
|
||||
|
||||
public class TransactionFactory {
|
||||
|
||||
private static final String[] NAMES = {"John", "Susan", "Marc", "Samantha"};
|
||||
private static long nextId = 1;
|
||||
|
||||
public Transfer newInstance() {
|
||||
String transactionId = String.valueOf( nextId++ );
|
||||
String owner = NAMES[ (int) floor(random()*NAMES.length) ];
|
||||
long amount = (long) (random()*1500 + 500);
|
||||
Transfer tx = new Transfer(transactionId, owner, amount);
|
||||
return tx;
|
||||
}
|
||||
|
||||
private static final String[] NAMES = { "John", "Susan", "Marc", "Samantha" };
|
||||
private static long nextId = 1;
|
||||
|
||||
public Transfer newInstance() {
|
||||
String transactionId = String.valueOf(nextId++);
|
||||
String owner = NAMES[(int) floor(random() * NAMES.length)];
|
||||
long amount = (long) (random() * 1500 + 500);
|
||||
Transfer tx = new Transfer(transactionId, owner, amount);
|
||||
return tx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ public class TransferDemo {
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
Transfer tx = transactionFactory.newInstance();
|
||||
|
||||
//Runnable task = new Log4JRunnable(tx);
|
||||
//Runnable task = new Log4J2Runnable(tx);
|
||||
|
||||
// Runnable task = new Log4JRunnable(tx);
|
||||
// Runnable task = new Log4J2Runnable(tx);
|
||||
Runnable task = new Slf4jRunnable(tx);
|
||||
|
||||
|
||||
executor.submit(task);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baeldung.ndc.Investment;
|
||||
import com.baeldung.ndc.service.InvestmentService;
|
||||
|
||||
|
||||
@RestController
|
||||
public class JBossLoggingController {
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user