
scp-cf-tomee, scp-cf-tomcat, and scp-neo-javaee7) will out-of-the-box include a beans.xml file that ensures that the CDI scanner does not search for beans in *.odata.namespaces.* packages of the VDM. This strongly reduces the required memory (especially, metaspace) of the application. Dependency injection of VDM services will still work because they are located in a different package.beans.xml file, create this file in the folder application/src/main/webapp/WEB-INF with the following content:<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
bean-discovery-mode="annotated">
<scan>
<!-- do not scan namespaces since CDI is only required for service classes -->
<exclude name="com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.**"/>
</scan>
</beans>beans.xml file, add the scan exclusion manually.manifest.yml files generated by the archetypes, because the default will work fine after applying above mentioned changes.attachToService that allows setting the OData service path and ErpConfigContext after creating an entity manually. Both parameters are optional and set to the default values if not provided. A thus configured entity can be used to issue calls to the backend system such as fetching associated entities:entity = BusinessPartner.builder().businessPartner("1").build();
entity.attachToService(null, null);
entity.fetchBusinessPartnerAddress();
scp-cf-tomee archetype to use Apache TomEE 7.0 (Web Profile), instead of 1.7. TomEE 7 targets JavaEE 7 (instead of JavaEE 6). In detail, we have adapted the manifest.yml to use the tomee7 runtime on SAP Cloud Platform, Cloud Foundry, and changed the TomEE Maven Plugin for local execution to 7.0.5.scp-cf-spring archetype now include hints how to setup security with the programmatic approach in Spring Boot. Those hints come as commented-out sections of required dependencies in the pom.xml and a sample SecurityConfig class. Additionally, we now manage spring-security and spring-security-oauth2 in the SDK's bill of material (BOM).UserAccessor and UserFacade now offer an additional method tryGetCurrentUser which returns a Try for the current user, similar to what is already available for tenants. This Try object contains the current user (possibly null) or any possibly thrown exception. This allows to write idiomatic code without try-catch-blocks. For more details on this monadic container type, refer to the Vavr user guide.sdk-bom dependency.2.9.0.<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sap.cloud.s4hana</groupId>
<artifactId>sdk-bom</artifactId>
<version>2.9.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<!-- possibly further managed dependencies ... -->
</dependencyManagement>-DarchetypeVersion=2.9.0 (or RELEASE).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 26 | |
| 24 | |
| 21 | |
| 13 | |
| 11 | |
| 9 | |
| 9 | |
| 8 | |
| 8 | |
| 8 |