Skip to content

KaydunovDenis/CAP-project-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAP-project-2

CAP java project, MTA app, OData v4

Running

mvn clean install mvn spring-boot:run



Deploying

Tutorial: Deploy MTA

npm install --global mbt
cf login

Install MultiApps: This is a Cloud Foundry CLI plugin (formerly known as CF MTA Plugin) for performing operations on multi-target applications (MTAs) in Cloud Foundry, such as deploying, removing, viewing, etc. It is a client for the CF MultiApps Controller (formerly known as CF MTA deploy-service), which is an MTA deployer implementation for Cloud Foundry.

cf install-plugin multiapps
cds add mta
mbt build -t ./
cf deploy CAP-project-2_1.0.0.mtar

check:

cf apps

Adding DB: https://developers.sap.com/tutorials/hana-cloud-mission-trial-2.html

cds add hana change a service-plan for a trial account in the yaml file:

resources:
  - name: hana_db
    type: com.sap.xs.hdi-container
    parameters:
      service: hana-cloud-trial
      service-plan: hana

Run this to generate an initial set of empty .csv files with header lines based on your CDS model:

cds add data

Useful CDS commands:

cds compile db/books.cds --to sql cds compile db/books.cds --to json

npm add @cap-js/sqlite -D

or

npm add sqlite3 -D
cds deploy --to sqlite //create db file with name db.sqlite

Dependency for SQLite

    <!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
    <dependency>
        <groupId>org.xerial</groupId>
        <artifactId>sqlite-jdbc</artifactId>
        <version>3.42.0.1</version>
    </dependency>

Resources

  1. Getting-started: OData
  2. Test data generation for CSV
  3. CAP: get-started
  4. CAP Java + Fiori elements
  5. CAP Java + Fiori elements
  6. Postman collection for testing

About

CAP java project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published