18.1. μνΈ μΈμ½λ© κ°μ²΄
<!-- μνΈ μΈμ½λ© κ°μ²΄ -->
<bean id="bcryptPasswordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"></bean>
νμ¬ μ°λ¦¬ μμ
κ³Όμ
Controller(λͺ¨λ μμ
μ‘΄μ¬) > DAO > AQL
νμ
κ³Όμ
Controller > Service(controller μμ
λΆν. κ°λ¨ν νλ¦λ§ μ μ΄) > DAO > SQL
νμ¬
Controller > Mapper > SQL (μμ
μ© κ°λ¨ν λ²μ )
Controller > DAO > Mapper > SQL
νμ
Controller > Service > DAO > Mapper > SQL
<!-- security-context.xml -->
<!-- μ¬μ©μ λ‘κ·ΈμΈ κ°μ²΄ -->
<bean id="customUserDetailsService" class="com.test.security.CustomUserDetailsService"></bean>
<!-- κ³μ κ΄λ¦¬ 맀λμ (νμ μμ΄λ/λΉλ²/κΆνλ±κΈ) -->
<!-- <security:authentication-manager>
<security:authentication-provider>
<security:user-service>
<security:user name="hong" password="{noop}1111"
authorities="ROLE_MEMBER" />
<security:user name="admin" password="{noop}1111"
authorities="ROLE_ADMIN, ROLE_MEMBER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager> -->
<security:authentication-manager>
<security:authentication-provider user-service-ref="customUserDetailsService"> <!-- μ€λΌν΄ λ°μν μΈμ¦ μ 보. customUserDetailsService μνν
맑긴λ€. -->
<security:password-encoder ref="bcryptPasswordEncoder"/> <!-- μΈμ½λ -->
</security:authentication-provider>
</security:authentication-manager>
μ€ν¨ μ
κΈ°μ‘΄ κ³μ μ κ°μ μ΄ μλλ μ΄λ©μΌ μλ‘ μμ± > google.com
νμκ°μ
-> μ»΄ν¨ν° λ μ
long term service
Ubuntu 22.04 LTS -> μ¬μ©
Ubuntu 20.04 LTS
IAM μ€μ
https://189947787190.signin.aws.amazon.com/console
μμ μ£Όμλ‘ λ€μ΄κ°κΈ°
google authenticator μ± μ€μΉ
IAM λ³μΉ μ€μ
μΈμ€ν΄μ€ μ’
λ£ λλ₯΄λ©΄ μλλ€.
=> μ»΄ν¨ν° μμ
3.36.74.20
μΈμ€ν΄μ€ μ€μ§ ν μμ
15.164.226.134
-> IPμ£Όμκ° λ³κ²½λλ€.
Ubuntu Server -> awsμ κΉλ¦Ό
Ubuntu Desktop
aws ν€ νμ΄ μ μ₯ν ν΄λμμ cmd μ΄κΈ°
> ssh -i ec2-class.pem ubuntu@15.164.226.134