Skip to content

Commit f68f376

Browse files
Update multitenancy configuration for CAP Java projects (#2476)
I just tested it with a new project and this is what has changed. Triggered by issue #2454
1 parent e4f56ef commit f68f376

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

guides/multitenancy/index.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ In case of **CAP Java** projects, the `cds add multitenancy` command...
112112

113113
```jsonc
114114
{
115-
"profiles": [
116-
"with-mtx-sidecar",
117-
"java"
118-
],
115+
"profile": "with-mtx-sidecar",
119116
"requires": {
120117
"[production]": {
121118
"multitenancy": true
119+
},
120+
"[with-mtx]": {
121+
"multitenancy": true
122122
}
123+
123124
}
124125
}
125126
```
@@ -132,18 +133,23 @@ In case of **CAP Java** projects, the `cds add multitenancy` command...
132133
<artifactId>cds-feature-mt</artifactId>
133134
<scope>runtime</scope>
134135
</dependency>
136+
137+
<dependency>
138+
<groupId>org.xerial</groupId>
139+
<artifactId>sqlite-jdbc</artifactId>
140+
<scope>runtime</scope>
141+
</dependency>
135142
```
136143

137-
3. Adds the following to your _srv/src/java/resources/application.yaml_:
144+
3. Adds the following to your _srv/src/main/resources/application.yaml_:
138145

139146
```yml
140147
---
141148
spring:
142-
config.activate.on-profile: cloud
149+
config.activate.on-profile: with-mtx
143150
cds:
144151
multi-tenancy:
145-
mtxs.enabled: true
146-
152+
sidecar.url: http://localhost:4005/ # in production mode overwrite with the URL from mta.yaml
147153
```
148154

149155
4. Adds a sidecar subproject at `mtx/sidecar` with this _package.json_:
@@ -155,8 +161,7 @@ In case of **CAP Java** projects, the `cds add multitenancy` command...
155161
"@cap-js/hana": "^2",
156162
"@sap/cds": "^9",
157163
"@sap/cds-mtxs": "^3",
158-
"@sap/xssec": "^4",
159-
"express": "^4"
164+
"@sap/xssec": "^4"
160165
},
161166
"devDependencies": {
162167
"@cap-js/sqlite": "^2"

0 commit comments

Comments
 (0)