Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serkan-ozal/vaadin-s4v
Spring for Vaadin
https://github.com/serkan-ozal/vaadin-s4v
Last synced: 15 days ago
JSON representation
Spring for Vaadin
- Host: GitHub
- URL: https://github.com/serkan-ozal/vaadin-s4v
- Owner: serkan-ozal
- Created: 2014-05-02T20:01:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-07T14:13:37.000Z (over 10 years ago)
- Last Synced: 2024-10-17T00:12:27.415Z (30 days ago)
- Language: Java
- Size: 156 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
What is vaadin-s4v?
==============**vaadin-s4v** is a **Java Instrumentation API** based integration framework to connect Vaddin UI components with beans of Spring context. Demo application is at [https://github.com/serkan-ozal/vaadin-s4v-demo](https://github.com/serkan-ozal/vaadin-s4v-demo).
Usage
=======To enable Vaadin and Spring integration automatically, there are three ways:
**1)** Import `context.xml` of **vaadin-s4v** in your `context.xml`.
~~~~~ xml
......
~~~~~or
**2)** Automatically scan Spring beans of **vaadin-s4v** in your `context.xml`.
~~~~~ xml
......
~~~~~or
**3)** Call explicitly integrating method at startup anywhere of your application.
~~~~~ java
...com.vaadin.s4v.SpringIntegrator.integrateVaadinWithSpring();
...
~~~~~And in any `com.vaadin.ui.Component` typed class, you can easily inject Spring beans in traditional way by using `@Autowired` annotation.
For example:
~~~~~ java
...public class MyView extends VerticalLayout {
@Autowired
private SpringBean springBean;
...
}...
~~~~~If you have got an error like this
~~~~~ java
...com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
...
~~~~~You must explicitly enable attach listener flag by `-XX:+StartAttachListener` as VM argument.
This error is caused by a bug of JVM on **MacOS** operating system.Installation
=======In your `pom.xml`, you must add repository and dependency for **vaadin-s4v**.
You can change `vaadin.s4v.version` to any existing **vaadin-s4v** library version.
Latest version is `1.0.0-SNAPSHOT`.~~~~~ xml
......
1.0.0-SNAPSHOT
......
...
com.vaadin
vaadin-s4v
${vaadin.s4v.version}
......
...
serkanozal-maven-repository
https://github.com/serkan-ozal/maven-repository/raw/master/
......
~~~~~