Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- fixed logging #28

Merged
merged 1 commit into from
Jan 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void create(DispatchedEvent<AccountOpenedEvent> de) {
AccountOpenedEvent event = de.getEvent();
String id = de.getEntityId();
Int128 eventId = de.getEventId();
logger.info("**************** account version=" + id + ", " + eventId);
logger.info("**************** account version={}, {}", id, eventId);
BigDecimal initialBalance = event.getInitialBalance();

String customerId = event.getCustomerId();
Expand All @@ -58,8 +58,8 @@ public void recordTransfer(DispatchedEvent<MoneyTransferCreatedEvent> de) {
String moneyTransferId = de.getEntityId();
String fromAccountId = de.getEvent().getDetails().getFromAccountId();
String toAccountId = de.getEvent().getDetails().getToAccountId();
logger.info("**************** account version=" + fromAccountId + ", " + eventId);
logger.info("**************** account version=" + toAccountId + ", " + eventId);
logger.info("**************** account version={}, {}", fromAccountId, eventId);
logger.info("**************** account version={}, {}", toAccountId, eventId);

AccountTransactionInfo ti = new AccountTransactionInfo(moneyTransferId,
fromAccountId,
Expand Down Expand Up @@ -120,7 +120,7 @@ public <T extends AccountChangedEvent> void saveChange(DispatchedEvent<T> de, in
long balanceDelta = amount * delta;
AccountChangeInfo ci = new AccountChangeInfo(changeId, transactionId, de.getEvent().getClass().getSimpleName(), amount, balanceDelta);
String accountId = de.getEntityId();
logger.info("**************** account version=" + accountId + ", " + de.getEventId().asString());
logger.info("**************** account version={}, {}", accountId, de.getEventId().asString());

accountInfoUpdateService.updateBalance(accountId, changeId, balanceDelta, ci);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ public AuthenticationManager authenticationManagerBean() throws Exception {

@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.httpBasic().and()
http
.csrf()
.disable()
.httpBasic()
.and()
.authorizeRequests()
.antMatchers("/index.html", "/", "/**.js", "/**.css").permitAll()
.antMatchers("/swagger-ui.html", "/v2/api-docs").permitAll()
.antMatchers(HttpMethod.POST, "/api/customers", "/api/login").permitAll()
.anyRequest().authenticated().and()
.antMatchers(HttpMethod.POST, "/api/customers", "/api/login").permitAll()
.antMatchers("/api/**").permitAll()
.anyRequest().permitAll()
.and()
.addFilterAfter(new StatelessAuthenticationFilter(tokenAuthenticationService), BasicAuthenticationFilter.class);
}

Expand Down