Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
Upgrade to Java 11, Vaadin 8.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-baiborodine committed Sep 24, 2019
1 parent e081dd9 commit 0e7bf59
Show file tree
Hide file tree
Showing 8 changed files with 198 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java

jdk:
- openjdk10
- openjdk11

script: mvn package

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Status](https://travis-ci.org/igor-baiborodine/jpetstore-6-vaadin-spring-boot.sv
#### This project is an exercise to port the original [JPetStore-6](https://github.com/mybatis/jpetstore-6) to Vaadin and Spring Boot.

### Branches
* **master** - Java 10, Vaadin 8.5.1 (active)
* **master** - Java 11, Vaadin 8.9.0 (active)
* **vaadin-v8-java-v8** - Java 8, Vaadin 8.3.0 (legacy)
* **vaadin-v8-with-v7-compatibility** - Vaadin 8.1.5 with Vaadin 7 compatibility (legacy)
* **vaadin-v7** - Vaadin 7.7.7 (legacy)
Expand All @@ -29,7 +29,7 @@ mvn clean package spring-boot:run
```

### Software and technologies used:
* [Java 10](http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html)
* [Java 11](https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html)
* [Vaadin 8](https://vaadin.com/home) with [Viritin](https://vaadin.com/directory#!addon/viritin) add-on
* [Spring 5](http://projects.spring.io/spring-framework/#quick-start)
* [Spring Boot 2](http://projects.spring.io/spring-boot/)
Expand Down
19 changes: 13 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@

<groupId>com.kiroule</groupId>
<artifactId>jpetstore-6-vaadin-spring-boot</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.4-SNAPSHOT</version>
<packaging>jar</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<name>jpetstore-6-vaadin-spring-boot</name>
<description>JPetStore Vaadin 8 with Spring Boot</description>

<properties>
<vaadin.version>8.5.1</vaadin.version>
<vaadin-spring.version>3.0.0</vaadin-spring.version>
<vaadin.version>8.9.0</vaadin.version>
<!-- <vaadin-spring.java.version>11.0.4</vaadin-spring.java.version>-->
<vaadin-spring.version>3.2.1</vaadin-spring.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<org.vaadin.spring.version>2.0.0.RELEASE</org.vaadin.spring.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<vaadin.widgetset.mode>cdn</vaadin.widgetset.mode>
</properties>

Expand Down Expand Up @@ -135,6 +136,12 @@
<artifactId>vaadin-spring-addon-eventbus</artifactId>
<version>${org.vaadin.spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.3.4.RELEASE</version>
</dependency>

<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.kiroule.jpetstore.vaadinspring.service.AccountService;
import com.kiroule.jpetstore.vaadinspring.service.CatalogService;
import com.kiroule.jpetstore.vaadinspring.service.LoginService;
import com.kiroule.jpetstore.vaadinspring.service.SigninService;
import com.kiroule.jpetstore.vaadinspring.service.OrderService;

import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -35,8 +35,8 @@ public OrderService orderService() {
}

@Bean
public LoginService loginService() {
return new LoginService();
public SigninService loginService() {
return new SigninService();
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @author Igor Baiborodine
*/
@Component
public class LoginService {
public class SigninService {

@Autowired
private AccountService accountService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kiroule.jpetstore.vaadinspring.ui.component;

import com.kiroule.jpetstore.vaadinspring.domain.Account;
import com.kiroule.jpetstore.vaadinspring.service.LoginService;
import com.kiroule.jpetstore.vaadinspring.service.SigninService;
import com.kiroule.jpetstore.vaadinspring.ui.event.UILoginEvent;
import com.kiroule.jpetstore.vaadinspring.ui.event.UILogoutEvent;
import com.kiroule.jpetstore.vaadinspring.ui.event.UINavigationEvent;
Expand Down Expand Up @@ -49,17 +49,17 @@ public class TopNavBar extends CssLayout implements HasUIEventBus {

private final NavBarButtonUpdater navBarButtonUpdater;
private final SigninForm signinForm;
private final LoginService loginService;
private final SigninService signinService;

private Button signinButton;
private Button signoutButton;
private Label userLabel;

@Autowired
public TopNavBar(NavBarButtonUpdater navBarButtonUpdater, SigninForm signinForm, LoginService loginService) {
public TopNavBar(NavBarButtonUpdater navBarButtonUpdater, SigninForm signinForm, SigninService signinService) {
this.navBarButtonUpdater = navBarButtonUpdater;
this.signinForm = signinForm;
this.loginService = loginService;
this.signinService = signinService;
}

@PostConstruct
Expand Down Expand Up @@ -89,7 +89,7 @@ public void handleAction(Object sender, Object target) {
final Window popup = signinForm.openInModalWidow();
signinForm.addLoginListener(loginEvent -> {
try {
Account account = loginService.login(loginEvent.getLoginParameter("username"),
Account account = signinService.login(loginEvent.getLoginParameter("username"),
loginEvent.getLoginParameter("password"));
getUIEventBus().publish(this, new UILoginEvent(account));
UI.getCurrent().removeWindow(popup);
Expand Down
Loading

0 comments on commit 0e7bf59

Please sign in to comment.