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

Improve versions #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ As you interact with the web-application ([http://localhost:3333](http://localho
in the second and third windows.

1. In a new window, run up a second account-server using HTTP port 2223:
* `java -jar target/microservice-demo-0.0.1-SNAPSHOT.jar accounts 2223`
* `java -jar target/microservice-demo-1.1.0-SNAPSHOT.jar accounts 2223`
1. Allow it to register itself
1. Kill the first account-server and see the web-server switch to using the new account-server - no loss of service.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Brixton.RELEASE</version>
<version>Camden.SR7</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@
import org.springframework.web.bind.annotation.RequestMethod;

/**
* Client controller, fetches Account info from the microservice via
* {@link WebAccountsService}.
* Client controller, fetches Account info from the microservice via {@link WebAccountsService}.
*
* @author Paul Chapman
*/
@Controller
public class WebAccountsController {

@Autowired
protected WebAccountsService accountsService;

protected Logger logger = Logger.getLogger(WebAccountsController.class
.getName());
protected Logger logger = Logger.getLogger(WebAccountsController.class.getName());

public WebAccountsController(WebAccountsService accountsService) {
this.accountsService = accountsService;
Expand All @@ -46,8 +43,7 @@ public String goHome() {
}

@RequestMapping("/accounts/{accountNumber}")
public String byNumber(Model model,
@PathVariable("accountNumber") String accountNumber) {
public String byNumber(Model model, @PathVariable("accountNumber") String accountNumber) {

logger.info("web-service byNumber() invoked: " + accountNumber);

Expand Down Expand Up @@ -76,8 +72,7 @@ public String searchForm(Model model) {
}

@RequestMapping(value = "/accounts/dosearch")
public String doSearch(Model model, SearchCriteria criteria,
BindingResult result) {
public String doSearch(Model model, SearchCriteria criteria, BindingResult result) {
logger.info("web-service search() invoked: " + criteria);

criteria.validate(result);
Expand Down