diff options
| author | Kostya <mail@sartin.in> | 2026-10-09 12:55:16 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-10-09 12:55:40 +0300 |
| commit | 9a62e94261e6531c6b60d296322e0cef2a5b21e1 (patch) | |
| tree | f684d5b0f350161b331e53149e7c8dabb9e1c885 /server/.classpath | |
| parent | 246c1ab5ffce1a1bb3c0534868b29f6e4c862a62 (diff) | |
| download | guess-market-9a62e94261e6531c6b60d296322e0cef2a5b21e1.tar.gz guess-market-9a62e94261e6531c6b60d296322e0cef2a5b21e1.tar.xz guess-market-9a62e94261e6531c6b60d296322e0cef2a5b21e1.zip | |
server: add Tomcat webapp module with shared engine and CORS
Exercise 3 moves the market behind a Tomcat server that the desktop
and browser clients share. Add a server module, registered in the
build scripts, holding the pieces every later endpoint builds on:
- ServerEngine wires one in-memory market (repositories, ledger,
trading pipeline, v3 upload loader) and lives in the servlet context
for the webapp's lifetime. Its catalog refuses path-based loading,
so events can only arrive through uploaded streams and the server
never reads or writes files.
- EngineBootstrap builds that engine when the webapp deploys.
- CorsFilter answers preflights and echoes the caller's Origin with
Allow-Credentials, which the browser client needs to send its
session cookie from another origin. With usernames as the only
login, echoing any origin exposes nothing a page couldn't get by
logging in itself.
- /api/health reports that the engine is up.
Vendor tomcat-juli 10.1.26 next to the other Tomcat jars. It ships in
Tomcat's bin/ rather than lib/, and embedded Tomcat cannot start
without it. A test deploys the module into embedded Tomcat, so
annotation scanning, the health check and CORS are checked against a
real container.
Diffstat (limited to 'server/.classpath')
| -rw-r--r-- | server/.classpath | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/server/.classpath b/server/.classpath new file mode 100644 index 0000000..90c57ca --- /dev/null +++ b/server/.classpath | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <classpath> | ||
| 3 | <classpathentry kind="src" output="bin/classes" path="src/main/java"/> | ||
| 4 | <classpathentry kind="src" output="bin/test-classes" path="src/test/java"> | ||
| 5 | <attributes> | ||
| 6 | <attribute name="test" value="true"/> | ||
| 7 | </attributes> | ||
| 8 | </classpathentry> | ||
| 9 | <classpathentry kind="src" path="/guess-market-api"/> | ||
| 10 | <classpathentry kind="src" path="/guess-market-service"/> | ||
| 11 | <classpathentry kind="lib" path="../lib/tomcat/servlet-api.jar"/> | ||
| 12 | <classpathentry kind="lib" path="../lib/gson/gson-2.11.0.jar" sourcepath="../lib/gson/gson-2.11.0-sources.jar"/> | ||
| 13 | <classpathentry kind="lib" path="../lib/jaxb/angus-activation.jar"/> | ||
| 14 | <classpathentry kind="lib" path="../lib/jaxb/jakarta.activation-api.jar"/> | ||
| 15 | <classpathentry kind="lib" path="../lib/jaxb/jaxb-core.jar"/> | ||
| 16 | <classpathentry kind="lib" path="../lib/jaxb/jaxb-impl.jar"/> | ||
| 17 | <classpathentry kind="lib" path="../lib/jaxb/jakarta.xml.bind-api.jar"/> | ||
| 18 | <classpathentry kind="lib" path="../lib/tomcat/annotations-api.jar"> | ||
| 19 | <attributes> | ||
| 20 | <attribute name="test" value="true"/> | ||
| 21 | </attributes> | ||
| 22 | </classpathentry> | ||
| 23 | <classpathentry kind="lib" path="../lib/tomcat/catalina.jar"> | ||
| 24 | <attributes> | ||
| 25 | <attribute name="test" value="true"/> | ||
| 26 | </attributes> | ||
| 27 | </classpathentry> | ||
| 28 | <classpathentry kind="lib" path="../lib/tomcat/el-api.jar"> | ||
| 29 | <attributes> | ||
| 30 | <attribute name="test" value="true"/> | ||
| 31 | </attributes> | ||
| 32 | </classpathentry> | ||
| 33 | <classpathentry kind="lib" path="../lib/tomcat/jasper.jar"> | ||
| 34 | <attributes> | ||
| 35 | <attribute name="test" value="true"/> | ||
| 36 | </attributes> | ||
| 37 | </classpathentry> | ||
| 38 | <classpathentry kind="lib" path="../lib/tomcat/jasper-el.jar"> | ||
| 39 | <attributes> | ||
| 40 | <attribute name="test" value="true"/> | ||
| 41 | </attributes> | ||
| 42 | </classpathentry> | ||
| 43 | <classpathentry kind="lib" path="../lib/tomcat/jaspic-api.jar"> | ||
| 44 | <attributes> | ||
| 45 | <attribute name="test" value="true"/> | ||
| 46 | </attributes> | ||
| 47 | </classpathentry> | ||
| 48 | <classpathentry kind="lib" path="../lib/tomcat/jsp-api.jar"> | ||
| 49 | <attributes> | ||
| 50 | <attribute name="test" value="true"/> | ||
| 51 | </attributes> | ||
| 52 | </classpathentry> | ||
| 53 | <classpathentry kind="lib" path="../lib/tomcat/tomcat-api.jar"> | ||
| 54 | <attributes> | ||
| 55 | <attribute name="test" value="true"/> | ||
| 56 | </attributes> | ||
| 57 | </classpathentry> | ||
| 58 | <classpathentry kind="lib" path="../lib/tomcat/tomcat-coyote.jar"> | ||
| 59 | <attributes> | ||
| 60 | <attribute name="test" value="true"/> | ||
| 61 | </attributes> | ||
| 62 | </classpathentry> | ||
| 63 | <classpathentry kind="lib" path="../lib/tomcat/tomcat-juli.jar"> | ||
| 64 | <attributes> | ||
| 65 | <attribute name="test" value="true"/> | ||
| 66 | </attributes> | ||
| 67 | </classpathentry> | ||
| 68 | <classpathentry kind="lib" path="../lib/tomcat/tomcat-util.jar"> | ||
| 69 | <attributes> | ||
| 70 | <attribute name="test" value="true"/> | ||
| 71 | </attributes> | ||
| 72 | </classpathentry> | ||
| 73 | <classpathentry kind="lib" path="../lib/tomcat/tomcat-util-scan.jar"> | ||
| 74 | <attributes> | ||
| 75 | <attribute name="test" value="true"/> | ||
| 76 | </attributes> | ||
| 77 | </classpathentry> | ||
| 78 | <classpathentry kind="lib" path="../lib/tomcat/tomcat-websocket.jar"> | ||
| 79 | <attributes> | ||
| 80 | <attribute name="test" value="true"/> | ||
| 81 | </attributes> | ||
| 82 | </classpathentry> | ||
| 83 | <classpathentry kind="lib" path="../lib/tomcat/websocket-api.jar"> | ||
| 84 | <attributes> | ||
| 85 | <attribute name="test" value="true"/> | ||
| 86 | </attributes> | ||
| 87 | </classpathentry> | ||
| 88 | <classpathentry kind="lib" path="../lib/junit/junit-platform-console-standalone-6.1.1.jar"/> | ||
| 89 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
| 90 | <classpathentry kind="output" path="bin"/> | ||
| 91 | </classpath> | ||