전체 글(847)
-
nslookup 구현
참조https://a-half-human-half-developer.tistory.com/108 [Java] nslookup자바로 nslookup을 구현할 수 있다. public void nslookup(String domain) { InetAddress[] inetaddr = null; try { inetaddr = InetAddress.getAllByName(domain); } catch(Exception e) { e.printStackTrace(); } for (InetAddress inetAddress : inetaddr) { Sysblog.develop-gyuri.cloudhttps://hstory0208.tistory.com/entry/Java%EC%9E%90%EB%B0%94-List%EC%9..
2024.08.23 -
Spring boot Security 2FA OTP 적용
OTP 등록Google 또는 MS Authenticator에 OTP 계정 추가비밀키 생성public class Base32 { private static final int SECRET_SIZE = 10; private static final SecureRandom RANDOM = new SecureRandom(); public static String random() { // Allocating the buffer byte[] buffer = new byte[SECRET_SIZE]; // Filling the buffer with random numbers. RANDOM.nextBytes(buffer); // Getting ..
2024.08.19 -
Spring boot Security 비밀번호 비교
중요한 것은 DB에 저장되는 암호화된 값과 입력받은 값을 암호화하는 암호화 방식이 동일해야 함DaoAuthenticationProvider에서 비밀번호 비교가 이루어짐확인하기 위해서 커스텀 객체를 생성하여 환경설정에 추가환경설정 파일 @Autowired private MemberUserDetailService memberUserDetailService; @Bean public DaoAuthenticationProvider authProvider() { CustomAuthenticationProvider authProvider = new CustomAuthenticationProvider(); authProvider.setUserDetailsService(memberUserDetail..
2024.08.15 -
Spring boot Security 에러 메세지 처리
예외 발생 처리if(member == null) { throw new BadCredentialsException("There in no member");}화면처리 message
2024.08.15 -
Spring boot Security Authentication 데이터 내용
입력name: AApassword: DDD소스@Slf4jpublic class CustomAuthenticationProvider extends DaoAuthenticationProvider { public Authentication authenticate(Authentication auth) throws AuthenticationException { log.debug(auth.getPrincipal().toString()); log.debug(auth.toString()); log.debug(auth.getName()); log.debug(auth.getDetails().toString()); log.debug(auth.getCrede..
2024.08.15 -
Spring boot mybatis 환경파일 설정
application.ymlmybatis: # 환경설정 파일 위치 설정 config-location: classpath:mybatis-config.xml # mapper 위치 설정 mapper-locations: mapper/*.xml # VO Class 패키지명 # 없어도 되지만, 없는 경우 mapper의 resultType에서 패키지명을 모두 기술해줘야 함 type-aliases-package: {클래스 패키지명}mybatis-config.xml # 컬럼의 '_'를 제거하기 위해서 적용 # 예) abc_def --> abcDef
2024.08.14