package Ġcom . github . j fl c . spring . cloud . service . s 3 . configuration Ċ Ċ import Ġcom . amazonaws . services . s 3 . Amazon S 3 Ċ import Ġcom . amazonaws . services . s 3 . Amazon S 3 Client Builder Ċ import Ġorg . springframework . boot . autoconfigure . condition . Conditional On Property Ċ import Ġorg . springframework . boot . context . properties . Enable Configuration Properties Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Component Scan Ċ import Ġorg . springframework . context . annotation . Configuration Ċ Ċ @ Configuration Ċ @ Component Scan ( base Packages Ġ= Ġ[" com . github . j fl c . spring . cloud . service . s 3 "]) Ċ @ Conditional On Property ( prefix Ġ= Ġ" spring . cloud . aws . s 3 ", Ġname Ġ= Ġ[" enabled "]) Ċ @ Enable Configuration Properties ( Amazon S 3 Properties :: class ) Ċ class ĠAmazon S 3 Configuration ( private Ġval Ġamazon S 3 Properties : ĠAmazon S 3 Properties ) Ġ{ ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġamazon S 3 (): ĠAmazon S 3 Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcredentials Provider Ġ= Ġthis . amazon S 3 Properties ĊĠĠĠĠĠĠĠ Ġval Ġregion Ġ= Ġthis . amazon S 3 Properties . region ĊĠĠĠĠĠĠĠ Ġreturn ĠAmazon S 3 Client Builder . standard () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Credentials ( credentials Provider ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Region ( region ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} Ċ Ċ }