Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dev-fringe/skeleton-starter-flow-spring-24
https://github.com/dev-fringe/skeleton-starter-flow-spring-24
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/dev-fringe/skeleton-starter-flow-spring-24
- Owner: dev-fringe
- License: unlicense
- Created: 2024-02-22T06:07:20.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-27T04:27:43.000Z (8 months ago)
- Last Synced: 2024-03-27T05:27:51.292Z (8 months ago)
- Language: Java
- Size: 1.29 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Project Base for Vaadin and Spring Boot
This project can be used as a starting point to create your own Vaadin application with Spring Boot.
It contains all the necessary configuration and some placeholder files to get you started.The best way to create your own project based on this starter is [start.vaadin.com](https://start.vaadin.com/) - you can get only the necessary parts and choose the package naming you want to use.
## Running the Application
There are two ways to run the application : using `mvn spring-boot:run` or by running the `Application` class directly from your IDE.You can use any IDE of your preference,but we suggest Eclipse or Intellij IDEA.
Below are the configuration details to start the project using a `spring-boot:run` command. Both Eclipse and Intellij IDEA are covered.#### Eclipse
- Right click on a project folder and select `Run As` --> `Maven build..` . After that a configuration window is opened.
- In the window set the value of the **Goals** field to `spring-boot:run`
- You can optionally select `Skip tests` checkbox
- All the other settings can be left to defaultOnce configurations are set clicking `Run` will start the application
#### Intellij IDEA
- On the right side of the window, select Maven --> Plugins--> `spring-boot` --> `spring-boot:run` goal
- Optionally, you can disable tests by clicking on a `Skip Tests mode` blue button.Clicking on the green run button will start the application.
After the application has started, you can view your it at http://localhost:8080/ in your browser.
If you want to run the application locally in the production mode, use `spring-boot:run -Pproduction` command instead.
### Running Integration TestsIntegration tests are implemented using [Vaadin TestBench](https://vaadin.com/testbench). The tests take a few minutes to run and are therefore included in a separate Maven profile. We recommend running tests with a production build to minimize the chance of development time toolchains affecting test stability. To run the tests using Google Chrome, execute
`mvn verify -Pit,production`
and make sure you have a valid TestBench license installed.
Profile `it` adds the following parameters to run integration tests:
```sh
-Dwebdriver.chrome.driver=path_to_driver
-Dcom.vaadin.testbench.Parameters.runLocally=chrome
```If you would like to run a separate test make sure you have added these parameters to VM Options of JUnit run configuration
### Live Reload (optional)
With live reload, you can see the results of your code changes immediately.
When you edit your Java code and recompile it, the application changes will be automatically reloaded and the browser is refreshed.
This is done by leveraging [Spring Boot Developer Tools](https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/html/using-boot-devtools.html).
To be able to see the changes in the browser tab, the page still needs to be reloaded.
That can also be automated via a LiveReload browser extension.
One such extension for Google Chrome is [LiveReload](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei).
In Firefox, [LiveReload - Web extension](https://addons.mozilla.org/en-US/firefox/addon/livereload-web-extension/) can be used.
You can find such similar extensions for other major browsers too.
These extensions add an icon to your browser next to the address bar.
To enable the extension, you should click that icon after you opened your application.You can find more information at [Live Reload in Spring Boot Applications](https://vaadin.com/docs/flow/workflow/tutorial-spring-boot-live-reload.html) document.
## Structure
Vaadin web applications are full-stack and include both client-side and server-side code in the same project.
| Directory | Description |
| :--- | :--- |
| `frontend/` | Client-side source directory |
| `index.html` | HTML template |
| `index.ts` | Frontend entrypoint |
| `main-layout.ts` | Main layout Web Component (optional) |
| `views/` | UI views Web Components (TypeScript / HTML) |
| `styles/` | Styles directory (CSS) |
| `src/main/java//` | Server-side source directory |
| `Application.java` | Server entrypoint |
| `AppShell.java` | application-shell configuration |## Useful links
- Read the documentation at [vaadin.com/docs](https://vaadin.com/docs).
- Follow the tutorials at [vaadin.com/tutorials](https://vaadin.com/tutorials).
- Watch training videos and get certified at [vaadin.com/learn/training](https://vaadin.com/learn/training).
- Create new projects at [start.vaadin.com](https://start.vaadin.com/).
- Search UI components and their usage examples at [vaadin.com/components](https://vaadin.com/components).
- View use case applications that demonstrate Vaadin capabilities at [vaadin.com/examples-and-demos](https://vaadin.com/examples-and-demos).
- Discover Vaadin's set of CSS utility classes that enable building any UI without custom CSS in the [docs](https://vaadin.com/docs/latest/ds/foundation/utility-classes).
- Find a collection of solutions to common use cases in [Vaadin Cookbook](https://cookbook.vaadin.com/).
- Find Add-ons at [vaadin.com/directory](https://vaadin.com/directory).
- Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/vaadin) or join our [Discord channel](https://discord.gg/MYFq5RTbBn).
- Report issues, create pull requests in [GitHub](https://github.com/vaadin/platform).