172만명의 커뮤니티!! 함께 토론해봐요.
해결됨
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
안녕하세요 비즈니스 메서드에 관해 궁금한 게 생겨서 질문드립니다. 강의 중에 엔티티를 변경할 때는 Setter대신 비즈니스 메서드를 별도 작성하여 제공하라고 해주셨는데 1) 등록이나 수정(save, update) 같은 것을 할 때 domain 쪽에 비즈니스 메서드를 작성하라는 뜻이 맞나요? 2) 구글링을 해보니 빌더 패턴, 정적펙토리 메소드 라는 기술도 존재하던데 비즈니스 메서드를 포함한 3가지는 궁극적으로 하는일이 비슷하다고 생각하는데 다른가요?
spring-boot 웹앱 웹앱 spring jpa java JPA
gnstjrdlsla
2023-02-09T00:47:21.616Z
댓글 1
좋아요 0
조회수 746
미해결
파이썬으로 영화 예매 오픈 알리미 만들기
링크를 복사하면 흰화면만 보이는데 이 경우에는 어떻게 해야하나요?
조윤희(풀스택 2회차)
2023-02-08T11:34:53.152Z
댓글 0
좋아요 7
조회수 1010
해결됨
스프링 시큐리티 OAuth2
OAuth2AuthorizationService 구현체를 JdbcOAuth2AuthorizationService로 변경하였습니다. Spring Authorization Server 버전은 1.0 입니다. @Bean public OAuth2AuthorizationService authorizationService(JdbcTemplate jdbcTemplate, RegisteredClientRepository registeredClientRepository) { return new JdbcOAuth2AuthorizationService(jdbcTemplate, registeredClientRepository); } DB Schema : Spring Authorization Server 에서 제공 /* IMPORTANT: If using PostgreSQL, update ALL columns defined with 'blob' to 'text', as PostgreSQL does not support the 'blob' data type. */ CREATE TABLE oauth2_authorization ( id varchar(100) NOT NULL, registered_client_id varchar(100) NOT NULL, principal_name varchar(200) NOT NULL, authorization_grant_type varchar(100) NOT NULL, authorized_scopes varchar(1000) DEFAULT NULL, attributes blob DEFAULT NULL, state varchar(500) DEFAULT NULL, authorization_code_value blob DEFAULT NULL, authorization_code_issued_at timestamp DEFAULT NULL, authorization_code_expires_at timestamp DEFAULT NULL, authorization_code_metadata blob DEFAULT NULL, access_token_value blob DEFAULT NULL, access_token_issued_at timestamp DEFAULT NULL, access_token_expires_at timestamp DEFAULT NULL, access_token_metadata blob DEFAULT NULL, access_token_type varchar(100) DEFAULT NULL, access_token_scopes varchar(1000) DEFAULT NULL, oidc_id_token_value blob DEFAULT NULL, oidc_id_token_issued_at timestamp DEFAULT NULL, oidc_id_token_expires_at timestamp DEFAULT NULL, oidc_id_token_metadata blob DEFAULT NULL, refresh_token_value blob DEFAULT NULL, refresh_token_issued_at timestamp DEFAULT NULL, refresh_token_expires_at timestamp DEFAULT NULL, refresh_token_metadata blob DEFAULT NULL, PRIMARY KEY (id) ); authorization code 발급시 로그인 화면 계정 정보 입력 후 MariaDB에 저장할떄 .BadSqlGrammarException 예외가 발생합니다, 질문1)에러 로그를 보면 insertAuthorization 메소드에서 attribute 컬럼에 Principal Class 자체를 저장하는 과정에서 발생하고 있습니다, 다만, 퀴리를 DB에서 직접 실행하면 저장이 되는것 으로 보아 Spring JDBCTemplate에서 변환시 오루가 발생하는거 같은데 원인이 궁급합니다. private void insertAuthorization(OAuth2Authorization authorization) { List<SqlParameterValue> parameters = this.authorizationParametersMapper.apply(authorization); try (LobCreator lobCreator = this.lobHandler.getLobCreator()) { PreparedStatementSetter pss = new LobCreatorArgumentPreparedStatementSetter(lobCreator, parameters.toArray()); this.jdbcOperations.update(SAVE_AUTHORIZATION_SQL, pss); } } Caused by: java.sql.SQLSyntaxErrorException: (conn=952251) Could not convert [{"@class":"java.util.Collections$UnmodifiableMap"," java.security .Principal":{"@class":" org.springframework.security .authentication.UsernamePasswordAuthenticationToken","authorities":["java.util.Collections$UnmodifiableRandomAccessList",[{"@class":" org.springframework.security .core.authority.SimpleGrantedAuthority","authority":"ROLE_USER"}]],"details":{"@class":" org.springframework.security .web.authentication.WebAuthenticationDetails","remoteAddress":"0:0:0:0:0:0:0:1","sessionId":"B8C2C171954B719820D6592F6102AF9B"},"authenticated":true,"principal":{"@class":" org.springframework.security .core.userdetails.User","password":null,"username":"user1","authorities":["java.util.Collections$UnmodifiableSet",[{"@class":" org.springframework.security .core.authority.SimpleGrantedAuthority","authority":"ROLE_USER"}]],"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true},"credentials":null}," org.springframework.security .oauth2.core.endpoint.OAuth2AuthorizationRequest":{"@class":" org.springframework.security .oauth2.core.endpoint.OAuth2AuthorizationRequest","authorizationUri":" http://localhost:9000/oauth2/authorize","authorizationGrantType":{"value":"authorization_code"},"responseType":{"value":"code"},"clientId":"messaging-client","redirectUri":"http://127.0.0.1:8080/login/oauth2/code/messaging-client-oidc","scopes":["java.util.Collections$UnmodifiableSet",["openid"]],"state":null,"additionalParameters":{"@class":"java.util.Collections$UnmodifiableMap","grant_type":"authorization_code"},"authorizationRequestUri":"http://localhost:9000/oauth2/authorize?response_type=code&client_id=messaging-client&scope=openid&redirect_uri=http://127.0.0.1:8080/login/oauth2/code/messaging-client-oidc&grant_type=authorization_code","attributes":{"@class":"java.util.Collections$UnmodifiableMap"} }}] to -4 RegisteredClientRepository는 구현체를 JdbcRegisteredClientRepository 로 변경해도 이상없이 동작 하고 있고 JdbcAuthorizationConsentService는 JdbcOAuth2AuthorizationService 오류로 동의 단게가 진행되지 않아서 확인해보지 않았습니다. 질문2)이외에도Authorization Server에서 blob 컴럼에 Class 자체를 저장하는 사례가 많이 있는데 커스참 구현체를 만들어서 Class 를 저장하지 않고 Authorization Server 필요한 항목만 JSON 으로 저장 하거나 테이블을 정규화 하여 Map 에 담아 주는것이 좋은 방법일까요? 참고로 Attribe는 JwtGenerator에서 보면 nonce 을 가지고 오고 있습니다. if (AuthorizationGrantType.AUTHORIZATION_CODE.equals(context.getAuthorizationGrantType())) { OAuth2AuthorizationRequest authorizationRequest = context.getAuthorization().getAttribute( OAuth2AuthorizationRequest.class.getName()); String nonce = (String) authorizationRequest.getAdditionalParameters().get(OidcParameterNames.NONCE); if (StringUtils.hasText(nonce)) { claimsBuilder.claim(IdTokenClaimNames.NONCE, nonce); } } 에러로그 전문 org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO oauth2_authorization (id, registered_client_id, principal_name, authorization_grant_type, authorized_scopes, attributes, state, authorization_code_value, authorization_code_issued_at, authorization_code_expires_at,authorization_code_metadata,access_token_value,access_token_issued_at,access_token_expires_at,access_token_metadata,access_token_type,access_token_scopes,oidc_id_token_value,oidc_id_token_issued_at,oidc_id_token_expires_at,oidc_id_token_metadata,refresh_token_value,refresh_token_issued_at,refresh_token_expires_at,refresh_token_metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)] at org.springframework.jdbc.support .SQLExceptionSubclassTranslator.doTranslate( SQLExceptionSubclassTranslator.java:101 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.support .AbstractFallbackSQLExceptionTranslator.translate( AbstractFallbackSQLExceptionTranslator.java:70 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.JdbcTemplate.translateException( JdbcTemplate.java:1538 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.JdbcTemplate.execute( JdbcTemplate.java:667 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.JdbcTemplate.update( JdbcTemplate.java:960 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.JdbcTemplate.update( JdbcTemplate.java:1015 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.security .oauth2.server.authorization.JdbcOAuth2AuthorizationService.insertAuthorization( JdbcOAuth2AuthorizationService.java:211 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.security.oauth2.server.authorization.JdbcOAuth2AuthorizationService.save ( JdbcOAuth2AuthorizationService.java:189 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.security .oauth2.server.authorization.authentication.OAuth2AuthorizationCodeRequestAuthenticationProvider.authenticate( OAuth2AuthorizationCodeRequestAuthenticationProvider.java:209 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.security .authentication.ProviderManager.authenticate( ProviderManager.java:182 ) ~[spring-security-core-6.0.1.jar:6.0.1] at org.springframework.security .oauth2.server.authorization.web.OAuth2AuthorizationEndpointFilter.doFilterInternal( OAuth2AuthorizationEndpointFilter.java:166 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .oauth2.server.authorization.web.OAuth2AuthorizationServerMetadataEndpointFilter.doFilterInternal( OAuth2AuthorizationServerMetadataEndpointFilter.java:84 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.authentication.logout.LogoutFilter.doFilter( LogoutFilter.java:107 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.authentication.logout.LogoutFilter.doFilter( LogoutFilter.java:93 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.csrf.CsrfFilter.doFilterInternal( CsrfFilter.java:116 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.header.HeaderWriterFilter.doHeadersAfter( HeaderWriterFilter.java:90 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.header.HeaderWriterFilter.doFilterInternal( HeaderWriterFilter.java:75 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .oauth2.server.authorization.config.annotation.web.configurers.AuthorizationServerContextFilter.doFilterInternal( AuthorizationServerContextFilter.java:61 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.context.SecurityContextHolderFilter.doFilter( SecurityContextHolderFilter.java:82 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.context.SecurityContextHolderFilter.doFilter( SecurityContextHolderFilter.java:69 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal( WebAsyncManagerIntegrationFilter.java:62 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.session.DisableEncodeUrlFilter.doFilterInternal( DisableEncodeUrlFilter.java:42 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.security .web.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:374 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.FilterChainProxy.doFilterInternal( FilterChainProxy.java:233 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.security .web.FilterChainProxy.doFilter( FilterChainProxy.java:191 ) ~[spring-security-web-6.0.1.jar:6.0.1] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate( DelegatingFilterProxy.java:351 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.web.filter.DelegatingFilterProxy.doFilter( DelegatingFilterProxy.java:267 ) ~[spring-web-6.0.4.jar:6.0.4] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:185 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:158 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.springframework.web.filter.RequestContextFilter.doFilterInternal( RequestContextFilter.java:100 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:185 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:158 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.springframework.web.filter.FormContentFilter.doFilterInternal( FormContentFilter.java:93 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:185 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:158 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal( CharacterEncodingFilter.java:201 ) ~[spring-web-6.0.4.jar:6.0.4] at org.springframework.web.filter.OncePerRequestFilter.doFilter( OncePerRequestFilter.java:116 ) ~[spring-web-6.0.4.jar:6.0.4] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:185 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:158 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:177 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:97 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.authenticator.AuthenticatorBase.invoke( AuthenticatorBase.java:542 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:119 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:92 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:78 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:357 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.coyote.http11.Http11Processor.service( Http11Processor.java:400 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.coyote.AbstractProcessorLight.process( AbstractProcessorLight.java:65 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process( AbstractProtocol.java:859 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.tomcat.util.net .NioEndpoint$SocketProcessor.doRun( NioEndpoint.java:1734 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.tomcat.util.net.SocketProcessorBase.run ( SocketProcessorBase.java:52 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1191 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run( ThreadPoolExecutor.java:659 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run( TaskThread.java:61 ) ~[tomcat-embed-core-10.1.5.jar:10.1.5] at java.base/java.lang.Thread.run( Thread.java:833 ) ~[na:na] Caused by: java.sql.SQLSyntaxErrorException: (conn=952251) Could not convert [{"@class":"java.util.Collections$UnmodifiableMap"," java.security .Principal":{"@class":" org.springframework.security .authentication.UsernamePasswordAuthenticationToken","authorities":["java.util.Collections$UnmodifiableRandomAccessList",[{"@class":" org.springframework.security .core.authority.SimpleGrantedAuthority","authority":"ROLE_USER"}]],"details":{"@class":" org.springframework.security .web.authentication.WebAuthenticationDetails","remoteAddress":"0:0:0:0:0:0:0:1","sessionId":"B8C2C171954B719820D6592F6102AF9B"},"authenticated":true,"principal":{"@class":" org.springframework.security .core.userdetails.User","password":null,"username":"user1","authorities":["java.util.Collections$UnmodifiableSet",[{"@class":" org.springframework.security .core.authority.SimpleGrantedAuthority","authority":"ROLE_USER"}]],"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true},"credentials":null}," org.springframework.security .oauth2.core.endpoint.OAuth2AuthorizationRequest":{"@class":" org.springframework.security .oauth2.core.endpoint.OAuth2AuthorizationRequest","authorizationUri":" http://localhost:9000/oauth2/authorize","authorizationGrantType":{"value":"authorization_code"},"responseType":{"value":"code"},"clientId":"messaging-client","redirectUri":"http://127.0.0.1:8080/login/oauth2/code/messaging-client-oidc","scopes":["java.util.Collections$UnmodifiableSet",["openid"]],"state":null,"additionalParameters":{"@class":"java.util.Collections$UnmodifiableMap","grant_type":"authorization_code"},"authorizationRequestUri":"http://localhost:9000/oauth2/authorize?response_type=code&client_id=messaging-client&scope=openid&redirect_uri=http://127.0.0.1:8080/login/oauth2/code/messaging-client-oidc&grant_type=authorization_code","attributes":{"@class":"java.util.Collections$UnmodifiableMap"} }}] to -4 at org.mariadb.jdbc.export.ExceptionFactory.createException( ExceptionFactory.java:282 ) ~[mariadb-java-client-3.0.10.jar:na] at org.mariadb.jdbc.export.ExceptionFactory.create( ExceptionFactory.java:336 ) ~[mariadb-java-client-3.0.10.jar:na] at org.mariadb.jdbc.BasePreparedStatement.setInternalObject( BasePreparedStatement.java:1172 ) ~[mariadb-java-client-3.0.10.jar:na] at org.mariadb.jdbc.BasePreparedStatement.setObject( BasePreparedStatement.java:608 ) ~[mariadb-java-client-3.0.10.jar:na] at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setObject( HikariProxyPreparedStatement.java ) ~[HikariCP-5.0.1.jar:na] at org.springframework.jdbc.core.StatementCreatorUtils.setValue( StatementCreatorUtils.java:415 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal( StatementCreatorUtils.java:236 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue( StatementCreatorUtils.java:152 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.ArgumentPreparedStatementSetter.doSetValue( ArgumentPreparedStatementSetter.java:65 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.security .oauth2.server.authorization.JdbcOAuth2AuthorizationService$LobCreatorArgumentPreparedStatementSetter.doSetValue( JdbcOAuth2AuthorizationService.java:621 ) ~[spring-security-oauth2-authorization-server-1.0.0.jar:1.0.0] at org.springframework.jdbc.core.ArgumentPreparedStatementSetter.setValues( ArgumentPreparedStatementSetter.java:50 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2( JdbcTemplate.java:963 ) ~[spring-jdbc-6.0.4.jar:6.0.4] at org.springframework.jdbc.core.JdbcTemplate.execute( JdbcTemplate.java:651 ) ~[spring-jdbc-6.0.4.jar:6.0.4] ... 68 common frames omitted
java spring spring-boot spring-boot oauth
신석균
2023-02-08T07:17:18.647Z
댓글 1
좋아요 0
조회수 1454
미해결
설계독학맛비's 실전 AI HW 설계를 위한 바이블, CNN 연산 완전정복 (Verilog HDL + FPGA 를 이용한 가속기 실습)
안녕하세요 맛비님. 이번 강의를 들으면서 수업 관련 개념을 명확하게 하고자 용어 정리를 하고자 합니다! 지금까지 해온 것들을 보면, CNN 연산 모듈을 설계했냐? -> 그렇다. input feature map을 input으로 넣어 output feature map을 도출했냐? -> 아니다. kernel의 size만큼 input feature map에서 window 해서 kernel size의 channel input만큼 해당하는 부분을 Convolution 연산하였다. 최종적으로는 output feature map 1포인트의 channel output만큼 해당하는 값을 구했다. 라고 할 수 있을까요? 처음 듣는 사람이 window라는 말을 잘 이해하지 못한다면 어떻게 쉽게 말할 수 있을까요?
cnn fpga 임베디드 임베디드 verilog-hdl
osia0921
2023-02-08T07:10:02.365Z
댓글 1
좋아요 1
조회수 503
미해결
차량 번호판 인식 프로젝트와 TensorFlow로 배우는 딥러닝 영상인식 올인원
안녕하세요, 1강 수업 듣다가 도저히 해결이 안되는 문제가 있어서 질문 드립니다. 실습할 때(1강 영상들 보는 중) 파이썬 파일을 파워쉘에서 1s을 쓰신 다음에 해당 폴더에 있는 py파일들 이름을 다 쓰신 다음에 python3 (실행할파일명.py) 이렇게 입력하시던데 어떻게 하는 건가요? 1s을 쳐도 그냥 오류가 뜨고 앞에꺼 안하고 그냥 python3 ( 실행파일명.py ) 치면 아무일도 안 일어나네요ㅠㅠ 답변 주신다면 정말 감사드리겠습니다.. 여기서 시간을 너무 많이 잡아먹어서ㅠ-ㅠ
머신러닝 NLP 딥러닝 머신러닝 배워볼래요? tensorflow 컴퓨터-비전 컴퓨터-비전 딥러닝 cnn
양정윤
2023-02-08T05:02:08.399Z
댓글 1
좋아요 0
조회수 509
해결됨
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
안녕하세요. 질문이 있습니다, @Id @GeneratedValue(...) private Long id; 이렇게는 사용해봤는데 처음에 =null 을 사용하신 이유가 궁금합니다.
spring-boot java JPA mysql aws spring
조재연
2023-02-08T02:50:16.981Z
댓글 1
좋아요 1
조회수 864
해결됨
실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
우선 2개의 질문을 참고하였습니다. 이것과 이것입니다. 두개의 글을 종합해 보면, V1에서 Order리스트를 반환할때는 Lazy방식이기 때문에 Member객체가 프록시 객체이고, Jackson이 해당 해당 객체를 접근하는 순간 초기화한다는 것입니다. 그리고 해당 프록시 객체를 JSON으로 읽을수 있도록 도와주는 것이 하이버네이트5모듈이라는 것입니다. 여기서 궁금한 점이 //강제 지연 로딩 설정 hibernate5Module.configure(Hibernate5Module.Feature.FORCE_LAZY_LOADING, true); 이 코드입니다. 해당 코드는 강제 지연 로딩 설정이라고 하는데 강의 21분 20초경 LAZY를 강제 초기화 한다고 나와있습니다. 저는 위의 코드와 for (Order order : orders) { order.getMember().getName(); order.getDelivery().getAddress(); } 이 코드가 같은 역할을 한다고 이해했습니다. 위의 두개의 코드를 삭제하면, 포스트맨으로 요청을 보냈을 때, Member, orderItems, Delivery에는 null 값이 들어갑니다. 두개의 코드중 하나를 넣으면 요청을 넣었을때 Member, orderItems, Delivery에 실제 값이 들어가게 됩니다. 하지만 위의 두 글을 종합한 내용을 보면 Jackson이 해당 해당 객체를 접근하는 순간 초기화 라는 내용이 있습니다. 그렇다면 이미 초기화 된 프록시 객체일텐데 왜 위의 강제초기화 코드를 넣어야 실제 값이 들어가게 되는지 궁금합니다. jackson이 프록시 객체에 접근할때 초기화가 되어서 두 코드를 넣지 않아도 null이 아닌 실제 값이 나와야하는 것 아닌가요? 글이 너무 길어 죄송합니다..ㅠㅠ
JPA spring java jpa spring-boot
양지웅
2023-02-07T12:36:03.121Z
댓글 1
좋아요 2
조회수 798
미해결
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
안녕하세요. 선생님 따라서 코딩중인데 구글링결과대로 시도해봐도 딱히 해결되지 않아서 질문 남겼습니다... 제목 그대로 import 자체가 되지 않아요 ㅠ
spring-boot JPA aws spring mysql jpa java
데브키맨
2023-02-07T11:45:14.696Z
댓글 2
좋아요 2
조회수 3635
미해결
자바 ORM 표준 JPA 프로그래밍 - 기본편
<요구사항> 사용자가 맘에 드는 장소를 저장 할 수 있다. Place 에서 FavoritePlace 를 Join 하고 싶다. <관계도> Place(1) - (N)FavoritePlace(N) - (1)User <질문내용> Place 에는 FavoritePlace 필드가 없기 때문에 join 을 사용 할 수 가 없어서 , 양방향 매핑을 이용 하였습니다. 이럴 경우 양방향 매핑을 사용하는것이 맞는지 궁금하고, FavoirtePlace 의 상태가 변경될때의,연관관계 편의메서드를 구현하였는데 흐름은 Place 가 가지고 있는 list 를 순회하여, 바뀌기전의 FavoirtePlace 를 삭제하고 새로운 FavoirtePlace 를 add 하는 로직을 선택하였습니다. 그러다보니 수많은 List 중 FavoirtePlace 하나를 순회하여 찾아 제거 하는 작업이 조금 버거울거같다는 고민이 생겼습니다. 제가 이해한 양방향을 써야 하는 상황이 이부분이 맞는지, 위와 같은 상황에서 어떻게 해결하는게 조금 더 현명할지 조언 듣고 싶습니다! 감사합니다
dlektl6
2023-02-07T11:31:47.495Z
댓글 3
좋아요 0
조회수 703
미해결
자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
BookMemoryRepository랑 BookMysqlRepository에 @Repository를 모두 붙이면 빨간줄이 강의상에선 나는데 저는 이상이 없는 데 혹시 스프링 버전 차이인건지 궁금합니다.
spring JPA java aws jpa mysql spring-boot
이진섭
2023-02-07T07:10:06.472Z
댓글 2
좋아요 1
조회수 656
해결됨
자바 ORM 표준 JPA 프로그래밍 - 기본편
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] Joincolumn의 name속성은 그저 member테이블의 조인컬럼의 컬럼명을 지정하는것뿐 team과 매핑하는것과는 관련이없다. member와 team을 연관관계맺는것은 referencedColumnName속성이 하지만 이것을 생략하면 자동으로 team의 pk값으로 연관관계를 맺어줘서 생략한다. 이게 맞을까요?
기범
2023-02-06T15:51:18.924Z
댓글 1
좋아요 0
조회수 627
미해결
자바 개발자를 위한 코틀린 입문(Java to Kotlin Starter Guide)
안녕하세요, 주제와는 좀 다른 질문인데요. 강의하시는거 보면 맥에서 intelij 를 상당히 잘 활용하신다고 느꼈습니다. 특히, 9강에서 ide 화면을 4분할로 빠르게 구성하는게 인상적이었는데, 혹시 그 방법과 단축키 알려주실수 있나요?
밗성배
2023-02-06T06:09:45.175Z
댓글 1
좋아요 1
조회수 642
미해결
차량 번호판 인식 프로젝트와 TensorFlow로 배우는 딥러닝 영상인식 올인원
안녕하세요, CRNN 모델을 Custom Dataset으로 Training 하려고 하는 도중에 위와 같은 에러가 발생하는데 해결 방법에 대해 문의를 드립니다.
머신러닝 딥러닝 cnn 딥러닝 컴퓨터-비전 컴퓨터-비전 NLP tensorflow 머신러닝 배워볼래요?
이서준
2023-02-06T05:16:42.576Z
댓글 0
좋아요 0
조회수 581
미해결
[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
- 본 강의 영상 학습 관련 문의에 대해 답변을 드립니다. (어떤 챕터 몇분 몇초를 꼭 기재부탁드립니다) - 이외의 문의등은 평생강의이므로 양해를 부탁드립니다 - 현업과 병행하는 관계로 주말/휴가 제외 최대한 3일내로 답변을 드리려 노력하고 있습니다 - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. <div class="layer_body" data-translation="true"> <p>금융당국이 급증하는 가계부채 증가세를 막기 위해 아파트 잔금대출에도 소득을 따져 대출한도를 정하는 총부채상환비율(DTI)을 적용하는 방안을 유력하게 검토하고 있다.</p> <p>지금은 집값을 기준으로 대출한도를 매기는 주택담보인정비율(LTV) 규제만 적용돼 소득이 없어도 집값의 70%를 빌려 잔금을 치르는 게 가능하다.</p> <p>앞으로 잔금대출에 DTI가 적용되면 소득이 없는 사람은 집값의 70% 대출 받는 게 어려워진다.</p> </div> 안녕하세요. 지금 강의 중인 내용에 보면 class의 div 값과 다르게 2개의 값이 연이어 나오는데요. 이런 경우에는 어떻게 입력하면 될까요? 복사해서 넣어보고 했는데 계속 오류가 뜹니다. import requests from bs4 import BeautifulSoup res = requests.get(' https://v.daum.net/v/20170615203441266 ') soup = BeautifulSoup(res.content,'html.parser') mydata = soup.find_all('div','layer_body' data-translation='true') mydata.get_text() 이런식으로 연달아서 넣으면 되는건지... 답변 부탁드려요^^
테디베어123
2023-02-05T22:10:21.795Z
댓글 2
좋아요 0
조회수 622
미해결
[개정판] 파이썬 머신러닝 완벽 가이드
안녕하세요 강의 잘 듣고 있습니다! 분류결정 임곗값에 대해서 강의를 들을땐 잘 이해가 됐었는데 복습하면서 정리하다보니 제가 잘 이해가 안되는 부분이 있어 질문드립니다. 예를 들어, 분류 결정 임곗값이 0.3까지 낮아졌다고 할 때 pred_proba array에서 [0.49, 0.51] 이런 식으로 나온 경우 결국 0이나, 1이나 둘 다 임곗값은 넘었는데 어떤 걸로 예측하나요? 임곗값을 0.5로 설정했을땐 이럴 일이 없겠지만 임곗값을 낮췄을 때 어떻게 분류가 되는지 궁금합니다. 확률 간의 비교를 해서 더 높은 확률로 분류를 하는지 아니면 단순히 둘 다 넘었을 땐 positive로 분류하는 건지 알고싶습니다! 감사합니다.
python 머신러닝 통계 통계 머신러닝 배워볼래요?
minglet
2023-02-05T10:08:31.328Z
댓글 1
좋아요 1
조회수 319
미해결
스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
따라치기에 바쁘고 코드를 적으시는데 이해못하면 잘못 듣고있는건가요? 자바 강의는 다 들었는데 뭘하시는지를 모르겠고 따라적기만 하고있습니다..
spring mvc spring-boot java MVC
송민석
2023-02-05T09:48:03.269Z
댓글 1
좋아요 0
조회수 286
미해결
코딩테스트 [ ALL IN ONE ]
개발자 취업 비밀노트는 제대로 왔는데 코딩테스트 강의는 공유가 오지 않네요... 제 아아디와 이메일은 아이디 : SecondPhantom 이메일은 second2phatom@gmail.com 입니다.
python algorithm 코테 준비 같이 해요!
2023-02-05T06:56:39.318Z
댓글 1
좋아요 1
조회수 517
해결됨
스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
해당 에러를 고치기 위해 세팅의 자바 컴파일러 버전을 11로 바꾸었는데 이렇게 진행하여도 괜찮은가요??
spring-boot mvc MVC spring java
정현주
2023-02-04T17:36:54.420Z
댓글 1
좋아요 0
조회수 559
미해결
자바 ORM 표준 JPA 프로그래밍 - 기본편
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Cannot drop "PRODUCT" because "FKR3MKF1FYVW50W5N52XQ1B8A4B" depends on it; SQL statement: 참조때문에 drop이 안되어서 create를 다시할떄 문제가 생기는 것같습니다.
kim1234123
2023-02-04T05:28:01.629Z
댓글 1
좋아요 1
조회수 489
미해결
JSP 웹 쇼핑몰 프로그래밍 기본 과정(JSP WEB Programming)
강사님 새해 인사 조금 늦졌지만 건강하세요 강사님의 지식을 뛰어난 전달력으로 강의 해주셔서 고맙습니다..
kangjee212
2023-02-04T03:48:05.605Z
댓글 1
좋아요 0
조회수 551