Skip to content

Commit 5554491

Browse files
committed
Update README
1 parent c1f7c51 commit 5554491

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,72 @@
11
This is an attempt to port the original work https://github.com/ornl-epics/pvws to a Spring Boot-based web application. While the code is adapted to the web socket APIs of Spring Boot, most of the code is essentially unchanged.
2+
3+
Requirements
4+
------------
5+
6+
To build: JDK 17, Maven 3.8+
7+
8+
To run: JRE 17
9+
10+
Build
11+
=====
12+
13+
Executable jar
14+
--------------
15+
16+
To build an executable Spring Boot jar (embedded Tomcat):
17+
18+
``>mvn clean install``
19+
20+
Output is ``pvws.jar`` in the ``target`` directory.
21+
22+
Tomcat war
23+
----------
24+
25+
To build war for deployment in Tomcat container:
26+
27+
``>mvn -Pwar clean install``
28+
29+
Output is ``pvws.war`` in the ``target`` directory.
30+
31+
Run
32+
===
33+
34+
Settings
35+
--------
36+
37+
Bundled ``application.properties`` defines a few settings (e.g. default protocol). To define other settings or override
38+
settings, one may create a file named exactly ``application.properties`` and edit as needed. This
39+
file must be readable by the user account owning the application process.
40+
41+
Executable jar
42+
--------------
43+
44+
Launch like so:
45+
46+
``>java -Dspring.config.location=file:/path/to/directory/ -jar /path/to/pvws.jar``
47+
48+
where ``/path/to/directory/`` is the directory holding ``application.properties``. Note that
49+
this string **must** end in a slash ("/").
50+
51+
It is also possible to define properties on the command line, e.g.
52+
53+
``>java -Dspring.config.location=file:/path/to/directory/ -DEPICS_PVA_ADDR_LIST=1.2.3.4 -jar /path/to/pvws.jar``
54+
55+
Combining ``application.properties`` with JVM options is possible.
56+
Command line options will override definitions in ``application.properties``.
57+
58+
Tomcat war
59+
----------
60+
61+
**NOTE:** Verified on Tomcat 9 only.
62+
63+
Copy ``pvws.war`` to ``TOMCAT_ROOT/webapps``. Set environment variable:
64+
65+
``>export JAVA_OPTS=-Dspring.config.location=file:/path/to/directory/``
66+
67+
and launch Tomcat.
68+
69+
70+
71+
72+

0 commit comments

Comments
 (0)