package Ġcom . w itk ups . car sharing Ċ Ċ import Ġorg . springframework . boot . Spring Application Ċ import Ġorg . springframework . boot . autoconfigure . SpringBoot Application Ċ import Ġorg . springframework . boot . autoconfigure . domain . Entity Scan Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . data . jpa . convert . th reet en . J sr 3 1 0 Jpa Converters Ċ import Ġorg . springframework . security . crypto . bcrypt . BC rypt Password Encoder Ċ import Ġorg . springframework . web . cors . Cors Configuration Ċ import Ġorg . springframework . web . cors . Url Based Cors Configuration Source Ċ import Ġorg . springframework . web . filter . Cors Filter ĊĊ Ċ @ SpringBoot Application Ċ @ Entity Scan ( base Package Classes Ġ= Ġ[ Car Sharing Application :: class , ĠJ sr 3 1 0 Jpa Converters :: class ]) Ċ class ĠCar Sharing Application Ġ{ ĊĊĠ Ġ@ Bean ĊĠ Ġfun Ġpassword Encoder () Ġ= ĠBC rypt Password Encoder () ĊĊĠ Ġ@ Bean ĊĠ Ġfun Ġcors Filter (): ĠC ors Filter Ġ{ ĊĠĠĠ Ġval Ġsource Ġ= ĠUrl Based Cors Configuration Source () ĊĠĠĠ Ġval Ġconfig Ġ= ĠC ors Configuration () ĊĠĠĠ Ġconfig . allow Credentials Ġ= Ġtrue ĊĠĠĠ Ġconfig . add Allowed Origin ("* ") ĊĠĠĠ Ġconfig . add Allowed Header ("* ") ĊĠĠĠ Ġconfig . add Allowed Method (" OPTIONS ") ĊĠĠĠ Ġconfig . add Allowed Method (" GET ") ĊĠĠĠ Ġconfig . add Allowed Method (" POST ") ĊĠĠĠ Ġconfig . add Allowed Method (" PUT ") ĊĠĠĠ Ġconfig . add Allowed Method (" DELETE ") ĊĠĠĠ Ġsource . register Cors Configuration (" /** ", Ġconfig ) ĊĠĠĠ Ġreturn ĠC ors Filter ( source ) ĊĠ Ġ} Ċ Ċ } Ċ Ċ fun Ġmain ( args : ĠArray < String >) Ġ{ ĊĠ ĠSpring Application . run ( Car Sharing Application :: class . java , Ġ* args ) Ċ } Ċ