WEB

미리 AWS 환경은 세팅해둔 상태! (external alb - web(ec2) - was(ec2)) 직접 apache와 tomcat을 올려보기 위한 작업을 할 것이다... 왜 web - was 분리 구성을 하는가? https://hwanchang.tistory.com/5 WEB 서버 구성(Apache) Apache 설치 및 시작 yum install -y httpd systemctl start httpd alb 의 target group 상태검사 경로 변경 index.html 생성 cd /var/www/html vi index.html # index.html WEB-A 서버입니다. health check: alb dns 주소를 통해 확인 health check: curl 명령어 활용 WAS 서버 구성(..
· Web/Spring
내가 설정해둔 spring의 암호화 방법은 bCrypt이다. //MvcConfig @Bean(name = "bCryptPasswordEncoder") public BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } 초기 admin 계정을 넣을 때 비밀번호를 어떻게 찾을까? https://www.devglan.com/online-tools/bcrypt-hash-generator 위의 사이트에서 text를 넣고 rounds를 선택해 Hash를 누르면 저절로 암호화된다. 이 암호문을 data.sql에 알맞은 위치에 넣고 실행시키면 admin 계정 비밀번호가 잘 저장되어 있을 것이다. 더 자세한 내용은 https://ju..
· Web/Spring
Intelli J에서 실행은 되지만 크롬 브라우저에서 들어가려고 하니.. 오류가 뜬다! 해결방법! 주소를 https:// 에서 http://로 바꿔서 접속한다 ❗ 너무 간단해서 오히려 화가난다.. ❗ ❗ http와 https 사용법도 나중에 정리해야지.. ❗
· Web/Spring
Role 사용을 해보자 내 프로젝트의 경우 ADD버튼이 admin으로 로그인했을 때만 나타나야 한다. Role @Getter @AllArgsConstructor public enum Role { ROLE_ADMIN("관리자", RoleBase.ADMINISTRATOR), ROLE_USER("사용자", RoleBase.USER); private String text; private RoleBase roleBase; public static List findByRoleBase(RoleBase roleBase) { return Arrays.stream(Role.values()).filter(p -> p.getRoleBase().equals(roleBase)) .collect(Collectors.toList()..
login 구현 화면부터 구성해보자 /resources/templates/auth/login login Forgot your Username or Password? | Sign up AuthController : 화면과 연결 @Controller @RequiredArgsConstructor @RequestMapping("/auth") public class AuthController { @NonNull private final UserService userService; @NonNull private final SmartValidator validator; @RequestMapping("/login") public String login() { return "auth/login"; } } UserServ..
· Web/Spring
login을 위한 setting pom.xml org.springframework.boot spring-boot-starter-security org.thymeleaf.extras thymeleaf-extras-springsecurity5 domain-User @Getter @Setter @Entity @Table(name = "user", indexes = {@Index(columnList = "username"), @Index(columnList = "name"), @Index(columnList = "role"), @Index(columnList = "enabled"), @Index(columnList = "removed")}) @NoArgsConstructor @EqualsAndHashCode(o..
yj_oo_
'WEB' 태그의 글 목록