I'm not a spring-boot expert, but to connect to SAP ECC you have a few options:
Connectors
SAP provides a set of different connectors to allow a communication with external systems. Those packages are supplied free of charges but with some legal limitations (see license FAQ). You also need credentials for the SAP Support to download it
Below a couple of connectors that can be suitable to your case
JCO connector
It is a Java library that allows you to make remote enabled functions call
See official link
SAP Business Connector
Another package to enable communications between SAP and external systems. Link here
.NET Connector
Same as JCO, for .NET framework
Call a WS provided by SAP system
If SAP is already providing the service you need to call (standard or a custom developed one) you can call it as a normal web service.
If such a service does not exist or is not exposed, some activities in SAP system will be needed (creation of the service itself, endpoint configurations etc...)
Using a middeware
You can call a service (soap/rest) through a middleware.
SAP provides its SAP Netweaver Process Orchestration, but others are available. This options is basically the same of the previous one: some work is needed in SAP system/Middleware system.