inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

gas 계산하는 부분이 이해가 되지 않습니다.

미해결

Ethereum 실전! 초보자를 위한 Lottery Dapp 개발

이더리움 GAS 계산 강의에서, Truffle console로 bet 함수의 가스비를 계산해보았습니다. 첫번째 실행과 두번째 실행시의 가스비가 15000 정도 차이가 나는데, 그 이유가 첫번째 실행에서는 tail 변수를 초기화해야해서 20000 gas가 소모되고 두번째 실행에서는 _tail 변수의 값만 업데이트하기 때문에 5000 gas가 소모되기 때문이라고 하셨습니다. 그런데 본 컨트렉트 코드에서는 tail을 초기화해주는 코드는 보이지 않고 오로지 _tail++; 코드만 존재하는데, 첫번째 실행에서도 업데이트를 해주는 것 아닐까요? 강사님의 답변을 기다리겠습니다!

  • dapp
  • ethereum
nuriz 댓글 1 좋아요 0 조회수 338

컨트롤러 반환 타입 질문입니다.

해결됨

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

안녕하세요, 강사님. 컨트롤러 코드 관련 질문입니다. 작성한 코드는 컨트롤러의 메소드 반환 타입을 void로 해서 아무것도 반환하지 않는데요, 만약 postmapping 관련 메소드 작성 시, 작성한 게시글의 id값을 반환해주는 코드와 큰 차이가 있을까요? 그리고 찾아보던 중, ResponseEntity를 사용해서 반환해주는 메소드를 보았는데, 메소드의 반환 타입에 따라 기능에 큰 차이가 있는지, 아니면 API 명세의 차이만 있고 기능에는 크게 차이가 없는지 궁금합니다!

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
jd 댓글 1 좋아요 1 조회수 842

memberServiceTest 회원가입 NullPointerException 오류

해결됨

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 안녕하세요. 강의를 한 번 완주한 후 개별적으로 예제와 다르게 다시 공부하고 있는데 오류가 나서요..ㅜㅜ https://drive.google.com/file/d/1Fe9hZbwSCKFYyQtmj_TU2Sl9VwqeXCsO/view?usp=sharing 무엇 때문에 오류가 났는지 알 수 있을까요??

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
새싹 댓글 2 좋아요 0 조회수 604

postman 실행 시 에러가 발생합니다.

미해결

GameFi - 블록체인 Web3 게임 만들기

4:50의 Unauthorized까지는 잘 따라왔는데 이후 2번째 지갑 주소를 복사, 붙여넣고 진행하니 이런 에러가 발생합니다. 뭐가 원인인지 알 수 있을까요? "error": "network does not support ENS (operation=\"getResolver\", network=\"maticmum\", code=UNSUPPORTED_OPERATION, version=providers/5.7.2)"

  • dapp
  • 블록체인
  • nft
  • web3
  • phaser
강수빈 댓글 2 좋아요 0 조회수 759

네트워크 변경 시 자동으로 로그아웃이 됩니다.

미해결

GameFi - 블록체인 Web3 게임 만들기

안녕하세요! 네트워크 변경 시 자동으로 로그아웃되어 글 남깁니다. 뭄바이 네트워크로 변경하라는 메세지만 뜨고 게임은 일시정지 해야하는데 아예 로그아웃이 되어버립니다. 아주 가끔씩 일시정지가 되기도 하는데 될때는 왜 되는지 이유가 뭔지 모르겠습니다 ㅠ logout은 account 변경 확인할때와 useEffect로 isConnected 확인할때만 사용하는데, 네트워크를 변경하게 되면 isConnected가 false로 바뀌기도 하나요?

  • dapp
  • 블록체인
  • nft
  • web3
  • phaser
강수빈 댓글 3 좋아요 0 조회수 811

Verify 간 오류가 발생합니다.

해결됨

GameFi - 블록체인 Web3 게임 만들기

해당 화면은 game 파일 verify error 화면입니다. 안녕하세요 선생님! token파일도, game 파일도 remix에서는 모두 잘 동작하는데 mumbai에서 verify가 되지 않습니다! remix와 mumbai 모두 8.16 버전 사용했고 flatten도 했습니다. 뭐가 잘못된건지 감도 잡히지 않아 질문드립니다. 바쁘시겠지만 답변 주시면 감사하겠습니다! 아래는 코드와 배포주소입니다. SnowmanToken_flattened.sol https://mumbai.polygonscan.com/address/0x01a444084a2578d7974a1e81a613bdaa4cdedaee // SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } // File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } // File: lecture/SnowmanToken.sol pragma solidity ^0.8.16; contract SnowmanToken is ERC20 { uint256 private constant MAX_SUPPLY = 1_000_000_000 * 10**18; constructor() ERC20("Snowman", "SNOW") { _mint(msg.sender, MAX_SUPPLY); } } SnowmanGame_flattened.sol https://mumbai.polygonscan.com/address/0x33d31ab92de6d967d4c0c23826b4d949720342be // SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/token/ERC1155/IERC1155.sol // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; } // File: @openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); } // File: @openzeppelin/contracts/utils/Counters.sol // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } } // File: @openzeppelin/contracts/utils/math/Math.sol // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/token/ERC1155/ERC1155.sol // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } } // File: @openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: lecture/SnowmanGame.sol pragma solidity ^0.8.16; contract SnowmanGame is ERC1155Supply, Ownable { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter public folderId; mapping(uint256 => string) public metadataHash; mapping(address => bool) private _authorized; modifier onlyAuthorized() { require(_authorized[msg.sender] || owner() == msg.sender, "not authorized"); _; } constructor() ERC1155("") { folderId.increment(); } function mint(address receiver, uint256 tokenId, uint256 quantity) external onlyAuthorized { _mint(receiver, tokenId, quantity, ""); } function confirmUpload(string calldata cidHash) external onlyOwner { metadataHash[folderId.current()] = cidHash; folderId.increment(); } function getIds(uint256 numOfMeta) external view returns (uint256[] memory) { uint256[] memory ids = new uint256[](numOfMeta); for(uint256 i = 0 ; i < ids.length; i++) { uint256 tokenId = (folderId.current() << 128) | i; ids[i] = tokenId; } return ids; } function tokenToFolderId(uint256 tokenId) public pure returns(uint256) { return tokenId >> 128; } function uri(uint256 tokenId) public view override returns (string memory) { return ( string( abi.encodePacked( "ipfs://", metadataHash[tokenToFolderId(tokenId)], "/", Strings.toString(tokenId), ".json" ) ) ); } function addAuthorized(address authorized) external onlyOwner { _authorized[authorized] = true; } function removeAuthorized(address authorized) external onlyOwner { _authorized[authorized] = false; } }

  • dapp
  • 블록체인
  • nft
  • web3
  • phaser
강수빈 댓글 1 좋아요 0 조회수 566

서브쿼리 안에 groupby시 sequence number not allowed here

미해결

실전! Querydsl

안녕하세요 oracle db에서 서브쿼리 안에서 groupby를 했을떄 ORA-02287 sequence number not allowed here 오류가 나옵니다. 검색해보니 SEQUENCE를 사용할 수 없는 경우는 다음과 같다. SELECT 문장의 경우에서 1. WHERE 절 안에서 2. GROUP BY나 ORDER BY 절에서 3. DISTINCT 절에서 4. UNION 이나 INTERSECT 나 MINUS 와 함께 사용 할때 5. 서브 쿼리 안에서 라고 하는데 제 경우에는 이 group by를 하고싶으면 어떻게 할수있나요? 감사합니다. Integer sucessCount =0, JPQLQuery<Tuple> subQuery = JPAExpressions.select( log.name, log.content, new CaseBuilder() .when(log.statusCode.eq("0") .then(sucessCount+1) .otherwise(successCount), client.id ) .from(log) .leftJoin(client) .on(client.name.eq(log.name)) //이 group by가 문제 .groupBy(log.name, log.content, client.id); queryFactory.insert(stats) .columns( stats.name, stats.content, stats.successCount, stats.clientId ) .select(subQuery) .execute();

  • java
  • jpa
댓글 1 좋아요 0 조회수 404

분산 데이터베이스 환경에서도 cqs패턴을 사용할 수 있나요?

해결됨

실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 커맨드와 쿼리를 분리한다고 하셨는데, 분산 데이터베이스 환경에서 update 쿼리에서 반환값을 가져오지 않고 다시 findOne을 수행한다고 가정했을때 전파가 아직 이루어지지 않아서 조회가 안되는 경우가 발생할 수도 있을까요? 이전에 물리적으로 분산 데이터베이스 환경에서 update되는 데이터가 많아서 find로 값을 불러오지 못한 경우가 있어서 무조건 update 쿼리를 보낼때 반환값을 받아서 처리했던 기억이 있어서 질문 드립니다.

  • java
  • spring
  • spring-boot
  • jpa
하얀종이개발자 댓글 1 좋아요 0 조회수 453

jpa 회원가입 테스트에서 오류가 납니다

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] jpa강의 중 test를 실행하는 부분에서 회원가입 test가 계속 오류가 납니다. 어느부분이 잘못됐는지도 잘 모르겠어요.. /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=50406:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/joyihan/.m2/repository/org/junit/platform/junit-platform-launcher/1.8.2/junit-platform-launcher-1.8.2.jar:/Users/joyihan/.m2/repository/org/junit/platform/junit-platform-engine/1.8.2/junit-platform-engine-1.8.2.jar:/Users/joyihan/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/joyihan/.m2/repository/org/junit/platform/junit-platform-commons/1.8.2/junit-platform-commons-1.8.2.jar:/Users/joyihan/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit5-rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Users/joyihan/study/hello-spring/out/test/classes:/Users/joyihan/study/hello-spring/out/production/classes:/Users/joyihan/study/hello-spring/out/production/resources:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-thymeleaf/2.7.8/fa1c619458d1e09fc749fce98c114d37af5af90b/spring-boot-starter-thymeleaf-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/2.7.8/7596f0263544e8230a5bf5357a02fb391f036f77/spring-boot-starter-web-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-jpa/2.7.8/ace969cae39b4479ffedd58e04c5a6eca60c94a5/spring-boot-starter-data-jpa-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-test/2.7.8/5751fec1eae46b9dce1ff399e25deade13b5265d/spring-boot-starter-test-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/2.7.8/df091ed288bd1dcf89fa0554a29fe96f27802efc/spring-boot-starter-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.thymeleaf/thymeleaf-spring5/3.0.15.RELEASE/7170e1bcd1588d38c139f7048ebcc262676441c3/thymeleaf-spring5-3.0.15.RELEASE.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.thymeleaf.extras/thymeleaf-extras-java8time/3.0.4.RELEASE/36e7175ddce36c486fff4578b5af7bb32f54f5df/thymeleaf-extras-java8time-3.0.4.RELEASE.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/2.7.8/fb09a04154ce2aea974755bc011a588eee2332aa/spring-boot-starter-json-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/2.7.8/8e7a62215cc56473c891480f722dda43dd6059d9/spring-boot-starter-tomcat-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.3.25/62a8258bcc4f7a58dd69af5140481b64653c90/spring-webmvc-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/5.3.25/c69815e7931cd3ce7f19cc8028fd1c36626120d6/spring-web-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-aop/2.7.8/72fc6a1e13d5e46b20c0d9e45574bfb0d6e7af6d/spring-boot-starter-aop-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-jdbc/2.7.8/5821d4af88c26bc5e23b7131ff8e68c67275d8b6/spring-boot-starter-jdbc-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/jakarta.transaction/jakarta.transaction-api/1.3.3/c4179d48720a1e87202115fbed6089bdc4195405/jakarta.transaction-api-1.3.3.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/jakarta.persistence/jakarta.persistence-api/2.2.3/8f6ea5daedc614f07a3654a455660145286f024e/jakarta.persistence-api-2.2.3.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-core/5.6.14.Final/71e407089b71ed7c6e99385fd851c308fed7be44/hibernate-core-5.6.14.Final.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-jpa/2.7.7/1c01c650d0132f44971d9e28509eb15475526a48/spring-data-jpa-2.7.7.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aspects/5.3.25/7afc5817a53aaccb2d71858cc5dceba716dba1db/spring-aspects-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test-autoconfigure/2.7.8/48f875d696d55257ce380d2c399d60030508d081/spring-boot-test-autoconfigure-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test/2.7.8/e90d0e2f4502d38244fbee6f5f03056abd24888b/spring-boot-test-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.jayway.jsonpath/json-path/2.7.0/f9d7d9659f2694e61142046ff8a216c047f263e8/json-path-2.7.0.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/jakarta.xml.bind/jakarta.xml.bind-api/2.3.3/48e3b9cfc10752fba3521d6511f4165bea951801/jakarta.xml.bind-api-2.3.3.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.assertj/assertj-core/3.22.0/c300c0c6a24559f35fa0bd3a5472dc1edcd0111e/assertj-core-3.22.0.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.2/1820c0968dba3a11a1b30669bb1f01978a91dedc/hamcrest-2.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter/5.8.2/5a817b1e63f1217e5c586090c45e681281f097ad/junit-jupiter-5.8.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-junit-jupiter/4.5.1/f81fb60bd69b3a6e5537ae23b883326f01632a61/mockito-junit-jupiter-4.5.1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/4.5.1/ed456e623e5afc6f4cee3ae58144e5c45f3b3bf/mockito-core-4.5.1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.5.1/6d842d0faf4cf6725c509a5e5347d319ee0431c3/jsonassert-1.5.1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/5.3.25/42a55c25a4da3bc330d8ab3ea7648cd76d0830d4/spring-test-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.3.25/85382e86321227506bf7f97ed80e2ab88bce25f0/spring-core-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.xmlunit/xmlunit-core/2.9.1/e5833662d9a1279a37da3ef6f62a1da29fcd68c4/xmlunit-core-2.9.1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.7.8/cb835d82d00116e907d341d11096c3476ab49721/spring-boot-autoconfigure-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/2.7.8/8db5af0f1171bb402c27a85fe97d741bddaa6fee/spring-boot-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/2.7.8/439c2c6fb705c4e7338b2c7a975a84b4f0cb3724/spring-boot-starter-logging-2.7.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/jakarta.annotation/jakarta.annotation-api/1.3.5/59eb84ee0d616332ff44aba065f3888cf002cd2d/jakarta.annotation-api-1.3.5.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.30/8fde7fe2586328ac3c68db92045e1c8759125000/snakeyaml-1.30.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.thymeleaf/thymeleaf/3.0.15.RELEASE/13e3296a03d8a597b734d832ed8656139bf9cdd8/thymeleaf-3.0.15.RELEASE.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.36/6c62681a2f655b49963a5983b8b0950a6120ae14/slf4j-api-1.7.36.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.13.4/e6d820112871f33cd94a1dcc54eef58874753b5/jackson-datatype-jsr310-2.13.4.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.13.4/858ccf6624b5fac6044813e845063edb6a62cf37/jackson-module-parameter-names-2.13.4.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.13.4/557dbba5d8dfc7b7f944c58fe084109afcb5670b/jackson-datatype-jdk8-2.13.4.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.13.4.2/325c06bdfeb628cfb80ebaaf1a26cc1eb558a585/jackson-databind-2.13.4.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/9.0.71/987b6460af04b08bc9914788d2762080afb09541/tomcat-embed-websocket-9.0.71.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/9.0.71/adaed61b4eaa5b52448336c0881fcd828fd51a2f/tomcat-embed-core-9.0.71.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/9.0.71/8fe43848c27ec921c8c5d6dcbd8b959076d7bf99/tomcat-embed-el-9.0.71.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/5.3.25/268a70ce4f44333ce0f13304c5f8c53b3df5f5f4/spring-context-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.3.25/d681cdb86611f03d8ef29654edde219fe5afef1d/spring-expression-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/5.3.25/722e30759b29331726f9deed76f80b22345ee627/spring-aop-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.3.25/b3aeae036b4ea1abfa1f9604d452e19664efe5f6/spring-beans-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.aspectj/aspectjweaver/1.9.7/158f5c255cd3e4408e795b79f7c3fbae9b53b7ca/aspectjweaver-1.9.7.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jdbc/5.3.25/809f5841b13d42e5d4d14eb13346958cc9e9e187/spring-jdbc-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.zaxxer/HikariCP/4.0.3/107cbdf0db6780a065f895ae9d8fbf3bb0e1c21f/HikariCP-4.0.3.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.7/ebcde6a44159eb9e3db721dfe6b45f26e6272341/jaxb-runtime-2.3.7.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/5.1.2.Final/e59ffdbc6ad09eeb33507b39ffcf287679a498c8/hibernate-commons-annotations-5.1.2.Final.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.4.3.Final/c4bd7e12a745c0e7f6cf98c45cdcdf482fd827ea/jboss-logging-3.4.3.Final.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.12.22/984e536b4f3fb668b21f15b90c1e8704292d4bdd/byte-buddy-1.12.22.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/antlr/antlr/2.7.7/83cd2cd674a217ade95a4bb83a8a14f351f48bd0/antlr-2.7.7.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.jboss/jandex/2.4.2.Final/1e1c385990b258ff1a24c801e84aebbacf70eb39/jandex-2.4.2.Final.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.5.1/3fe0bed568c62df5e89f4f174c101eab25345b6c/classmate-1.5.1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-orm/5.3.25/b0fb2911a5d528037149240c8b4f2c820d90405b/spring-orm-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/2.7.7/5c320aa46d71707aabdc7287b6f83122ce33f55c/spring-data-commons-2.7.7.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/5.3.25/b459d0b755c9614a55ebd39ce353748c4b210be2/spring-tx-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/net.minidev/json-smart/2.4.8/7c62f5f72ab05eb54d40e2abf0360a2fe9ea477f/json-smart-2.4.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/jakarta.activation/jakarta.activation-api/1.2.2/99f53adba383cb1bf7c3862844488574b559621f/jakarta.activation-api-1.2.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-params/5.8.2/ddeafe92fc263f895bfb73ffeca7fd56e23c2cce/junit-jupiter-params-5.8.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.8.2/4c21029217adf07e4c0d0c5e192b6bf610c94bdc/junit-jupiter-api-5.8.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.12.22/9c4127080df12304336ca90c2ef3f8b7d72915c1/byte-buddy-agent-1.12.22.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/fa26d351fe62a6a17f5cda1287c1c6110dec413f/android-json-0.0.20131108.vaadin1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/5.3.25/2e65a986dc7f98b40faed8df1d50db77c0b96c61/spring-jcl-5.3.25.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.11/4741689214e9d1e8408b206506cbe76d1c6a7d60/logback-classic-1.2.11.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.17.2/17dd0fae2747d9a28c67bc9534108823d2376b46/log4j-to-slf4j-2.17.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.36/ed46d81cef9c412a88caef405b58f93a678ff2ca/jul-to-slf4j-1.7.36.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.attoparser/attoparser/2.0.5.RELEASE/a93ad36df9560de3a5312c1d14f69d938099fa64/attoparser-2.0.5.RELEASE.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.unbescape/unbescape/1.1.6.RELEASE/7b90360afb2b860e09e8347112800d12c12b2a13/unbescape-1.1.6.RELEASE.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.13.4/858c6cc78e1f08a885b1613e1d817c829df70a6e/jackson-annotations-2.13.4.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.13.4/cf934c681294b97ef6d80082faeefbe1edadf56/jackson-core-2.13.4.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/txw2/2.3.7/55cddcac1945150e09b09b0f89d86799652eee82/txw2-2.3.7.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.sun.istack/istack-commons-runtime/3.0.12/cbbe1a62b0cc6c85972e99d52aaee350153dc530/istack-commons-runtime-3.0.12.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/net.minidev/accessors-smart/2.4.8/6e1bee5a530caba91893604d6ab41d0edcecca9a/accessors-smart-2.4.8.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.1.2/a231e0d844d2721b0fa1b238006d15c6ded6842a/apiguardian-api-1.1.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.8.2/32c8b8617c1342376fd5af2053da6410d8866861/junit-platform-commons-1.8.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.2.0/28c11eb91f9b6d8e200631d46e20a7f407f2a046/opentest4j-1.2.0.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.11/a01230df5ca5c34540cdaa3ad5efb012f1f1f792/logback-core-1.2.11.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.17.2/f42d6afa111b4dec5d2aea0fe2197240749a4ea6/log4j-api-2.17.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.1/a99500cf6eea30535eeac6be73899d048f8d12a8/asm-9.1.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.h2database/h2/2.1.214/d5c2005c9e3279201e12d4776c948578b16bf8b2/h2-2.1.214.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.8.2/c598b4328d2f397194d11df3b1648d68d7d990e3/junit-jupiter-engine-5.8.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/3.2/7fadf57620c8b8abdf7519533e5527367cb51f09/objenesis-3.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/com.sun.activation/jakarta.activation/1.2.2/74548703f9851017ce2f556066659438019e7eb5/jakarta.activation-1.2.2.jar:/Users/joyihan/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.8.2/b737de09f19864bd136805c84df7999a142fec29/junit-platform-engine-1.8.2.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 hello.hellospring.service.MemberServiceintegrationTest,회원가입 22:28:16.165 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate] 22:28:16.171 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support .DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)] 22:28:16.193 [main] DEBUG org.springframework.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [hello.hellospring.service.MemberServiceintegrationTest] from class [org.springframework.boot.test.context.SpringBootTestContextBootstrapper] 22:28:16.200 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [hello.hellospring.service.MemberServiceintegrationTest], using SpringBootContextLoader 22:28:16.203 [main] DEBUG org.springframework.test.context.support .AbstractContextLoader - Did not detect default resource location for test class [hello.hellospring.service.MemberServiceintegrationTest]: class path resource [hello/hellospring/service/MemberServiceintegrationTest-context.xml] does not exist 22:28:16.203 [main] DEBUG org.springframework.test.context.support .AbstractContextLoader - Did not detect default resource location for test class [hello.hellospring.service.MemberServiceintegrationTest]: class path resource [hello/hellospring/service/MemberServiceintegrationTestContext.groovy] does not exist 22:28:16.203 [main] INFO org.springframework.test.context.support .AbstractContextLoader - Could not detect default resource locations for test class [hello.hellospring.service.MemberServiceintegrationTest]: no resource found for suffixes {-context.xml, Context.groovy}. 22:28:16.204 [main] INFO org.springframework.test.context.support .AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [hello.hellospring.service.MemberServiceintegrationTest]: MemberServiceintegrationTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 22:28:16.229 [main] DEBUG org.springframework.test.context.support .ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [hello.hellospring.service.MemberServiceintegrationTest] 22:28:16.264 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [/Users/joyihan/study/hello-spring/out/production/classes/hello/hellospring/HelloSpringApplication.class] 22:28:16.266 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration hello.hellospring.HelloSpringApplication for test class hello.hellospring.service.MemberServiceintegrationTest 22:28:16.325 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - @TestExecutionListeners is not present for class [hello.hellospring.service.MemberServiceintegrationTest]: using defaults. 22:28:16.325 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support .DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.event.ApplicationEventsTestExecutionListener, org.springframework.test.context.support .DependencyInjectionTestExecutionListener, org.springframework.test.context.support .DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener] 22:28:16.336 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@784c3487, org.springframework.test.context.support .DirtiesContextBeforeModesTestExecutionListener@53142455, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@40dff0b7, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@7966baa7, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@60975100, org.springframework.test.context.support .DirtiesContextTestExecutionListener@1253e7cb, org.springframework.test.context.transaction.TransactionalTestExecutionListener@2d36e77e, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@61c9c3fd, org.springframework.test.context.event.EventPublishingTestExecutionListener@3b0c9195, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@366c4480, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@2c7b5824, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@302a07d, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@5cdd09b1, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@8c11eee, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@7e8dcdaa] 22:28:16.338 [main] DEBUG org.springframework.test.context.support .AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@52d645b1 testClass = MemberServiceintegrationTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@2101b44a testClass = MemberServiceintegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustomizerFactory$DisableMetricExportContextCustomizer@28194a50, org.springframework.boot.test.autoconfigure.properties .PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@4149c063, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@62656be4, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@222a59e6, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@70e38ce1, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@1ffe63b9], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true]], class annotated with @DirtiesContext [false] with mode [null]. . ____ _ /\\ / ___'_ __ ( _)_ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.7.8) 2023-05-15 22:28:16.767 INFO 6865 --- [ main] h.h.s.MemberServiceintegrationTest : Starting MemberServiceintegrationTest using Java 11.0.18 on joihan-ui-MacBookPro.local with PID 6865 (started by joyihan in /Users/joyihan/study/hello-spring) 2023-05-15 22:28:16.768 INFO 6865 --- [ main] h.h.s.MemberServiceintegrationTest : No active profile set, falling back to 1 default profile: "default" 2023-05-15 22:28:17.165 INFO 6865 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-05-15 22:28:17.176 INFO 6865 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 JPA repository interfaces. 2023-05-15 22:28:17.573 INFO 6865 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2023-05-15 22:28:17.610 INFO 6865 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.14.Final 2023-05-15 22:28:17.719 INFO 6865 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations { 5.1.2.Final } 2023-05-15 22:28:17.786 INFO 6865 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-05-15 22:28:22.937 ERROR 6865 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization. org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-214] at org.h2.message.DbException.getJdbcSQLException( DbException.java:510 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.readException( SessionRemote.java:637 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.done( SessionRemote.java:606 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.initTransfer( SessionRemote.java:163 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.connectServer( SessionRemote.java:433 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.connectEmbeddedOrServer( SessionRemote.java:325 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.jdbc.JdbcConnection.<init>( JdbcConnection.java:122 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.Driver.connect( Driver.java:59 ) ~[h2-2.1.214.jar:2.1.214] at com.zaxxer.hikari.util.DriverDataSource.getConnection( DriverDataSource.java:138 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.PoolBase.newConnection( PoolBase.java:364 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.PoolBase.newPoolEntry( PoolBase.java:206 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariPool.createPoolEntry( HikariPool.java:476 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariPool.checkFailFast( HikariPool.java:561 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariPool.<init>( HikariPool.java:115 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.HikariDataSource.getConnection( HikariDataSource.java:112 ) ~[HikariCP-4.0.3.jar:na] at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection( DatasourceConnectionProviderImpl.java:122 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection( JdbcEnvironmentInitiator.java:181 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:68 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:35 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService( StandardServiceRegistryImpl.java:101 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService( AbstractServiceRegistryImpl.java:263 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:237 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.id .factory.internal.DefaultIdentifierGeneratorFactory.injectServices( DefaultIdentifierGeneratorFactory.java:175 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies( AbstractServiceRegistryImpl.java:286 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:243 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>( InFlightMetadataCollectorImpl.java:173 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete( MetadataBuildingProcess.java:127 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata( EntityManagerFactoryBuilderImpl.java:1460 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build ( EntityManagerFactoryBuilderImpl.java:1494 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory( SpringHibernateJpaPersistenceProvider.java:58 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory( LocalContainerEntityManagerFactoryBean.java:365 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory( AbstractEntityManagerFactoryBean.java:409 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet( AbstractEntityManagerFactoryBean.java:396 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet( LocalContainerEntityManagerFactoryBean.java:341 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.invokeInitMethods( AbstractAutowireCapableBeanFactory.java:1863 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.initializeBean( AbstractAutowireCapableBeanFactory.java:1800 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.doCreateBean( AbstractAutowireCapableBeanFactory.java:620 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.createBean( AbstractAutowireCapableBeanFactory.java:542 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.lambda$doGetBean$0( AbstractBeanFactory.java:335 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .DefaultSingletonBeanRegistry.getSingleton( DefaultSingletonBeanRegistry.java:234 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:333 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.getBean( AbstractBeanFactory.java:208 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.getBean( AbstractApplicationContext.java:1154 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.finishBeanFactoryInitialization( AbstractApplicationContext.java:908 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.refresh( AbstractApplicationContext.java:583 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.boot.SpringApplication.refresh( SpringApplication.java:731 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.refreshContext( SpringApplication.java:408 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:307 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.test.context.SpringBootContextLoader.loadContext( SpringBootContextLoader.java:136 ) ~[spring-boot-test-2.7.8.jar:2.7.8] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal( DefaultCacheAwareContextLoaderDelegate.java:141 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext( DefaultCacheAwareContextLoaderDelegate.java:90 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.support .DefaultTestContext.getApplicationContext( DefaultTestContext.java:124 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary( ServletTestExecutionListener.java:190 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance( ServletTestExecutionListener.java:132 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.TestContextManager.prepareTestInstance( TestContextManager.java:248 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance( SpringExtension.java:138 ) ~[spring-test-5.3.25.jar:5.3.25] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable( ClassBasedTestDescriptor.java:368 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.stream.ReferencePipeline$3$1.accept( ReferencePipeline.java:195 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$2$1.accept( ReferencePipeline.java:177 ) ~[na:na] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ArrayList.java:1655 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyInto( AbstractPipeline.java:484 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto( AbstractPipeline.java:474 ) ~[na:na] at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining( StreamSpliterators.java:312 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:735 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:734 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$Head.forEach( ReferencePipeline.java:658 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors( ClassBasedTestDescriptor.java:362 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6( ClassBasedTestDescriptor.java:283 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance( ClassBasedTestDescriptor.java:282 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4( ClassBasedTestDescriptor.java:272 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.Optional.orElseGet( Optional.java:369 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5( ClassBasedTestDescriptor.java:271 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances( TestInstancesProvider.java:31 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0( TestMethodTestDescriptor.java:102 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:101 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:66 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$prepare$2( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.prepare( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:90 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.submit( SameThreadHierarchicalTestExecutorService.java:35 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestExecutor.execute( HierarchicalTestExecutor.java:57 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestEngine.execute( HierarchicalTestEngine.java:54 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:107 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:88 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0( EngineExecutionOrchestrator.java:54 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams( EngineExecutionOrchestrator.java:67 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:52 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:114 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute( DefaultLauncherSession.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute( SessionPerRequestLauncher.java:53 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs( JUnit5IdeaTestRunner.java:57 ) ~[junit5-rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute( IdeaTestRunner.java:38 ) ~[junit-rt.jar:na] at com.intellij.rt.execution.junit.TestsRepeater.repeat( TestsRepeater.java:11 ) ~[idea_rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs( IdeaTestRunner.java:35 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart( JUnitStarter.java:232 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.main( JUnitStarter.java:55 ) ~[junit-rt.jar:na] 2023-05-15 22:28:22.941 WARN 6865 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-214] at org.h2.message.DbException.getJdbcSQLException( DbException.java:510 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.readException( SessionRemote.java:637 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.done( SessionRemote.java:606 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.initTransfer( SessionRemote.java:163 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.connectServer( SessionRemote.java:433 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.engine.SessionRemote.connectEmbeddedOrServer( SessionRemote.java:325 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.jdbc.JdbcConnection.<init>( JdbcConnection.java:122 ) ~[h2-2.1.214.jar:2.1.214] at org.h2.Driver.connect( Driver.java:59 ) ~[h2-2.1.214.jar:2.1.214] at com.zaxxer.hikari.util.DriverDataSource.getConnection( DriverDataSource.java:138 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.PoolBase.newConnection( PoolBase.java:364 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.PoolBase.newPoolEntry( PoolBase.java:206 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariPool.createPoolEntry( HikariPool.java:476 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariPool.checkFailFast( HikariPool.java:561 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariPool.<init>( HikariPool.java:115 ) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.HikariDataSource.getConnection( HikariDataSource.java:112 ) ~[HikariCP-4.0.3.jar:na] at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection( DatasourceConnectionProviderImpl.java:122 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection( JdbcEnvironmentInitiator.java:181 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:68 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:35 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService( StandardServiceRegistryImpl.java:101 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService( AbstractServiceRegistryImpl.java:263 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:237 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.id .factory.internal.DefaultIdentifierGeneratorFactory.injectServices( DefaultIdentifierGeneratorFactory.java:175 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies( AbstractServiceRegistryImpl.java:286 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:243 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>( InFlightMetadataCollectorImpl.java:173 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete( MetadataBuildingProcess.java:127 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata( EntityManagerFactoryBuilderImpl.java:1460 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build ( EntityManagerFactoryBuilderImpl.java:1494 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory( SpringHibernateJpaPersistenceProvider.java:58 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory( LocalContainerEntityManagerFactoryBean.java:365 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory( AbstractEntityManagerFactoryBean.java:409 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet( AbstractEntityManagerFactoryBean.java:396 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet( LocalContainerEntityManagerFactoryBean.java:341 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.invokeInitMethods( AbstractAutowireCapableBeanFactory.java:1863 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.initializeBean( AbstractAutowireCapableBeanFactory.java:1800 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.doCreateBean( AbstractAutowireCapableBeanFactory.java:620 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.createBean( AbstractAutowireCapableBeanFactory.java:542 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.lambda$doGetBean$0( AbstractBeanFactory.java:335 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .DefaultSingletonBeanRegistry.getSingleton( DefaultSingletonBeanRegistry.java:234 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:333 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.getBean( AbstractBeanFactory.java:208 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.getBean( AbstractApplicationContext.java:1154 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.finishBeanFactoryInitialization( AbstractApplicationContext.java:908 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.refresh( AbstractApplicationContext.java:583 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.boot.SpringApplication.refresh( SpringApplication.java:731 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.refreshContext( SpringApplication.java:408 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:307 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.test.context.SpringBootContextLoader.loadContext( SpringBootContextLoader.java:136 ) ~[spring-boot-test-2.7.8.jar:2.7.8] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal( DefaultCacheAwareContextLoaderDelegate.java:141 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext( DefaultCacheAwareContextLoaderDelegate.java:90 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.support .DefaultTestContext.getApplicationContext( DefaultTestContext.java:124 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary( ServletTestExecutionListener.java:190 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance( ServletTestExecutionListener.java:132 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.TestContextManager.prepareTestInstance( TestContextManager.java:248 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance( SpringExtension.java:138 ) ~[spring-test-5.3.25.jar:5.3.25] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable( ClassBasedTestDescriptor.java:368 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.stream.ReferencePipeline$3$1.accept( ReferencePipeline.java:195 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$2$1.accept( ReferencePipeline.java:177 ) ~[na:na] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ArrayList.java:1655 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyInto( AbstractPipeline.java:484 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto( AbstractPipeline.java:474 ) ~[na:na] at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining( StreamSpliterators.java:312 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:735 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:734 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$Head.forEach( ReferencePipeline.java:658 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors( ClassBasedTestDescriptor.java:362 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6( ClassBasedTestDescriptor.java:283 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance( ClassBasedTestDescriptor.java:282 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4( ClassBasedTestDescriptor.java:272 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.Optional.orElseGet( Optional.java:369 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5( ClassBasedTestDescriptor.java:271 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances( TestInstancesProvider.java:31 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0( TestMethodTestDescriptor.java:102 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:101 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:66 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$prepare$2( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.prepare( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:90 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.submit( SameThreadHierarchicalTestExecutorService.java:35 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestExecutor.execute( HierarchicalTestExecutor.java:57 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestEngine.execute( HierarchicalTestEngine.java:54 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:107 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:88 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0( EngineExecutionOrchestrator.java:54 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams( EngineExecutionOrchestrator.java:67 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:52 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:114 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute( DefaultLauncherSession.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute( SessionPerRequestLauncher.java:53 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs( JUnit5IdeaTestRunner.java:57 ) ~[junit5-rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute( IdeaTestRunner.java:38 ) ~[junit-rt.jar:na] at com.intellij.rt.execution.junit.TestsRepeater.repeat( TestsRepeater.java:11 ) ~[idea_rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs( IdeaTestRunner.java:35 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart( JUnitStarter.java:232 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.main( JUnitStarter.java:55 ) ~[junit-rt.jar:na] 2023-05-15 22:28:22.946 ERROR 6865 --- [ main] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] 2023-05-15 22:28:22.947 WARN 6865 --- [ main] o.s.w.c.s.GenericWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] 2023-05-15 22:28:22.958 INFO 6865 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2023-05-15 22:28:22.971 ERROR 6865 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.initializeBean( AbstractAutowireCapableBeanFactory.java:1804 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.doCreateBean( AbstractAutowireCapableBeanFactory.java:620 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.createBean( AbstractAutowireCapableBeanFactory.java:542 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.lambda$doGetBean$0( AbstractBeanFactory.java:335 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .DefaultSingletonBeanRegistry.getSingleton( DefaultSingletonBeanRegistry.java:234 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:333 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.getBean( AbstractBeanFactory.java:208 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.getBean( AbstractApplicationContext.java:1154 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.finishBeanFactoryInitialization( AbstractApplicationContext.java:908 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.refresh( AbstractApplicationContext.java:583 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.boot.SpringApplication.refresh( SpringApplication.java:731 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.refreshContext( SpringApplication.java:408 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:307 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.test.context.SpringBootContextLoader.loadContext( SpringBootContextLoader.java:136 ) ~[spring-boot-test-2.7.8.jar:2.7.8] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal( DefaultCacheAwareContextLoaderDelegate.java:141 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext( DefaultCacheAwareContextLoaderDelegate.java:90 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.support .DefaultTestContext.getApplicationContext( DefaultTestContext.java:124 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary( ServletTestExecutionListener.java:190 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance( ServletTestExecutionListener.java:132 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.TestContextManager.prepareTestInstance( TestContextManager.java:248 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance( SpringExtension.java:138 ) ~[spring-test-5.3.25.jar:5.3.25] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable( ClassBasedTestDescriptor.java:368 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.stream.ReferencePipeline$3$1.accept( ReferencePipeline.java:195 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$2$1.accept( ReferencePipeline.java:177 ) ~[na:na] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ArrayList.java:1655 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyInto( AbstractPipeline.java:484 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto( AbstractPipeline.java:474 ) ~[na:na] at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining( StreamSpliterators.java:312 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:735 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:734 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$Head.forEach( ReferencePipeline.java:658 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors( ClassBasedTestDescriptor.java:362 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6( ClassBasedTestDescriptor.java:283 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance( ClassBasedTestDescriptor.java:282 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4( ClassBasedTestDescriptor.java:272 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.Optional.orElseGet( Optional.java:369 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5( ClassBasedTestDescriptor.java:271 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances( TestInstancesProvider.java:31 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0( TestMethodTestDescriptor.java:102 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:101 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:66 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$prepare$2( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.prepare( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:90 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.submit( SameThreadHierarchicalTestExecutorService.java:35 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestExecutor.execute( HierarchicalTestExecutor.java:57 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestEngine.execute( HierarchicalTestEngine.java:54 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:107 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:88 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0( EngineExecutionOrchestrator.java:54 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams( EngineExecutionOrchestrator.java:67 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:52 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:114 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute( DefaultLauncherSession.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute( SessionPerRequestLauncher.java:53 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs( JUnit5IdeaTestRunner.java:57 ) ~[junit5-rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute( IdeaTestRunner.java:38 ) ~[junit-rt.jar:na] at com.intellij.rt.execution.junit.TestsRepeater.repeat( TestsRepeater.java:11 ) ~[idea_rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs( IdeaTestRunner.java:35 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart( JUnitStarter.java:232 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.main( JUnitStarter.java:55 ) ~[junit-rt.jar:na] Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService( AbstractServiceRegistryImpl.java:275 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:237 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.id .factory.internal.DefaultIdentifierGeneratorFactory.injectServices( DefaultIdentifierGeneratorFactory.java:175 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies( AbstractServiceRegistryImpl.java:286 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:243 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>( InFlightMetadataCollectorImpl.java:173 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete( MetadataBuildingProcess.java:127 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata( EntityManagerFactoryBuilderImpl.java:1460 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build ( EntityManagerFactoryBuilderImpl.java:1494 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory( SpringHibernateJpaPersistenceProvider.java:58 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory( LocalContainerEntityManagerFactoryBean.java:365 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory( AbstractEntityManagerFactoryBean.java:409 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet( AbstractEntityManagerFactoryBean.java:396 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet( LocalContainerEntityManagerFactoryBean.java:341 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.invokeInitMethods( AbstractAutowireCapableBeanFactory.java:1863 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.initializeBean( AbstractAutowireCapableBeanFactory.java:1800 ) ~[spring-beans-5.3.25.jar:5.3.25] ... 86 common frames omitted Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect( DialectFactoryImpl.java:100 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect( DialectFactoryImpl.java:54 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:138 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:35 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService( StandardServiceRegistryImpl.java:101 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService( AbstractServiceRegistryImpl.java:263 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] ... 103 common frames omitted 2023-05-15 22:28:22.972 ERROR 6865 --- [ main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@784c3487] to prepare test instance [hello.hellospring.service.MemberServiceintegrationTest@5a9840f3] java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext( DefaultCacheAwareContextLoaderDelegate.java:98 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.support .DefaultTestContext.getApplicationContext( DefaultTestContext.java:124 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary( ServletTestExecutionListener.java:190 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance( ServletTestExecutionListener.java:132 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.TestContextManager.prepareTestInstance( TestContextManager.java:248 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance( SpringExtension.java:138 ) ~[spring-test-5.3.25.jar:5.3.25] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$8( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable( ClassBasedTestDescriptor.java:368 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$9( ClassBasedTestDescriptor.java:363 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.stream.ReferencePipeline$3$1.accept( ReferencePipeline.java:195 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$2$1.accept( ReferencePipeline.java:177 ) ~[na:na] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining( ArrayList.java:1655 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyInto( AbstractPipeline.java:484 ) ~[na:na] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto( AbstractPipeline.java:474 ) ~[na:na] at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining( StreamSpliterators.java:312 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:735 ) ~[na:na] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining( Streams.java:734 ) ~[na:na] at java.base/java.util.stream.ReferencePipeline$Head.forEach( ReferencePipeline.java:658 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors( ClassBasedTestDescriptor.java:362 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6( ClassBasedTestDescriptor.java:283 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance( ClassBasedTestDescriptor.java:282 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4( ClassBasedTestDescriptor.java:272 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at java.base/java.util.Optional.orElseGet( Optional.java:369 ) ~[na:na] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5( ClassBasedTestDescriptor.java:271 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances( TestInstancesProvider.java:31 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0( TestMethodTestDescriptor.java:102 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:101 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare( TestMethodTestDescriptor.java:66 ) ~[junit-jupiter-engine-5.8.2.jar:5.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$prepare$2( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.prepare( NodeTestTask.java:123 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:90 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at java.base/java.util.ArrayList.forEach( ArrayList.java:1541 ) ~[na:na] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll( SameThreadHierarchicalTestExecutorService.java:41 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$6( NodeTestTask.java:155 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$8( NodeTestTask.java:141 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.Node.around( Node.java:137 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.lambda$executeRecursively$9( NodeTestTask.java:139 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.ThrowableCollector.execute( ThrowableCollector.java:73 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.executeRecursively( NodeTestTask.java:138 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.NodeTestTask.execute( NodeTestTask.java:95 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.SameThreadHierarchicalTestExecutorService.submit( SameThreadHierarchicalTestExecutorService.java:35 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestExecutor.execute( HierarchicalTestExecutor.java:57 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.engine.support .hierarchical.HierarchicalTestEngine.execute( HierarchicalTestEngine.java:54 ) ~[junit-platform-engine-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:107 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:88 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0( EngineExecutionOrchestrator.java:54 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams( EngineExecutionOrchestrator.java:67 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute( EngineExecutionOrchestrator.java:52 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:114 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncher.execute( DefaultLauncher.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute( DefaultLauncherSession.java:86 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute( SessionPerRequestLauncher.java:53 ) ~[junit-platform-launcher-1.8.2.jar:1.8.2] at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs( JUnit5IdeaTestRunner.java:57 ) ~[junit5-rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute( IdeaTestRunner.java:38 ) ~[junit-rt.jar:na] at com.intellij.rt.execution.junit.TestsRepeater.repeat( TestsRepeater.java:11 ) ~[idea_rt.jar:na] at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs( IdeaTestRunner.java:35 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart( JUnitStarter.java:232 ) ~[junit-rt.jar:na] at com.intellij.rt.junit.JUnitStarter.main( JUnitStarter.java:55 ) ~[junit-rt.jar:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.initializeBean( AbstractAutowireCapableBeanFactory.java:1804 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.doCreateBean( AbstractAutowireCapableBeanFactory.java:620 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.createBean( AbstractAutowireCapableBeanFactory.java:542 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.lambda$doGetBean$0( AbstractBeanFactory.java:335 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .DefaultSingletonBeanRegistry.getSingleton( DefaultSingletonBeanRegistry.java:234 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:333 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractBeanFactory.getBean( AbstractBeanFactory.java:208 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.getBean( AbstractApplicationContext.java:1154 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.finishBeanFactoryInitialization( AbstractApplicationContext.java:908 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support .AbstractApplicationContext.refresh( AbstractApplicationContext.java:583 ) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.boot.SpringApplication.refresh( SpringApplication.java:731 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.refreshContext( SpringApplication.java:408 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:307 ) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.test.context.SpringBootContextLoader.loadContext( SpringBootContextLoader.java:136 ) ~[spring-boot-test-2.7.8.jar:2.7.8] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal( DefaultCacheAwareContextLoaderDelegate.java:141 ) ~[spring-test-5.3.25.jar:5.3.25] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext( DefaultCacheAwareContextLoaderDelegate.java:90 ) ~[spring-test-5.3.25.jar:5.3.25] ... 71 common frames omitted Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService( AbstractServiceRegistryImpl.java:275 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:237 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.id .factory.internal.DefaultIdentifierGeneratorFactory.injectServices( DefaultIdentifierGeneratorFactory.java:175 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies( AbstractServiceRegistryImpl.java:286 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService( AbstractServiceRegistryImpl.java:243 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService( AbstractServiceRegistryImpl.java:214 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>( InFlightMetadataCollectorImpl.java:173 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete( MetadataBuildingProcess.java:127 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata( EntityManagerFactoryBuilderImpl.java:1460 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build ( EntityManagerFactoryBuilderImpl.java:1494 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory( SpringHibernateJpaPersistenceProvider.java:58 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory( LocalContainerEntityManagerFactoryBean.java:365 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory( AbstractEntityManagerFactoryBean.java:409 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet( AbstractEntityManagerFactoryBean.java:396 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet( LocalContainerEntityManagerFactoryBean.java:341 ) ~[spring-orm-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.invokeInitMethods( AbstractAutowireCapableBeanFactory.java:1863 ) ~[spring-beans-5.3.25.jar:5.3.25] at org.springframework.beans.factory.support .AbstractAutowireCapableBeanFactory.initializeBean( AbstractAutowireCapableBeanFactory.java:1800 ) ~[spring-beans-5.3.25.jar:5.3.25] ... 86 common frames omitted Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect( DialectFactoryImpl.java:100 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect( DialectFactoryImpl.java:54 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:138 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService( JdbcEnvironmentInitiator.java:35 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService( StandardServiceRegistryImpl.java:101 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService( AbstractServiceRegistryImpl.java:263 ) ~[ hibernate-core-5.6.14.Final .jar: 5.6.14.Final ] ... 103 common frames omitted Process finished with exit code 255 오류코드입니다. JpaMemberRepository입니다. package hello.hellospring.repository; import hello.hellospring.domain.Member; import javax.persistence.EntityManager; import java.util.List; import java.util.Optional; public class JpaMemberRepository implements MemberRepository{ private final EntityManager em; public JpaMemberRepository(EntityManager em) { this.em = em; } @Override public Member save(Member member) { em.persist(member); return member; } @Override public Optional<Member> findById(Long id) { Member member = em.find(Member.class, id); return Optional. ofNullable (member); } @Override public Optional<Member> findByName(String name) { List<Member> result = em.createQuery("select m from Member m where m.name = :name", Member.class) .setParameter("name", name) .getResultList(); return result.stream ().findAny(); } @Override public List<Member> findAll() { return em.createQuery("select m from Member m", Member.class) .getResultList(); } } MemberService입니다 package hello.hellospring.service; import hello.hellospring.domain.Member; import hello.hellospring.repository.MemberRepository; import hello.hellospring.repository.MemoryMemberRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.swing.text.html.Option; import java.util.List; import java.util.Optional; @Transactional public class MemberService { private final MemberRepository memberRepository; public MemberService(MemberRepository memberRepository) { this.memberRepository = memberRepository; } /** 회원 가입 / public Long join(Member member) { validateDuplicateMember(member); //중복 회원 검증 memberRepository.save (member); return member.getId(); } private void validateDuplicateMember(Member member) { memberRepository.findByName(member.getName()) .ifPresent(m -> { throw new IllegalStateException("이미 존재하는 회원입니다."); }); } /** 전체 회원 조회 / public List<Member> findMembers(){ return memberRepository.findAll(); } public Optional<Member> findOne(Long memberId){ return memberRepository.findById(memberId); } } SpringConfig입니다. package hello.hellospring; import hello.hellospring.repository.*; import hello.hellospring.service.MemberService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import javax.persistence.EntityManager; import javax.sql.DataSource; import javax.xml.crypto.Data ; @Configuration public class SpringConfig { private final DataSource dataSource; private EntityManager em; @Autowired public SpringConfig(DataSource dataSource, EntityManager em) { this.dataSource = dataSource; this.em = em; } @Bean public MemberService memberService(){ return new MemberService(memberRepository()); } @Bean public MemberRepository memberRepository(){ //return new MemoryMemberRepository(); //return new JdbcMemberRepository(dataSource); //return new JdbcTemplateMemberRepository(dataSource); return new JpaMemberRepository(em); } }

  • java
  • spring
  • mvc
  • spring-boot
조이한 댓글 2 좋아요 0 조회수 1488

OOP 란 무엇인가요?

미해결

Java/Spring 주니어 개발자를 위한 오답노트

최근 OOP 란 무엇인가요? 질문을 받았는대, 어버버한 경험이 있는대, 범위가 너무 광범위하여 답하기가 어렵습니다.

  • java
  • spring
  • 객체지향
  • 소프트웨어-테스트
박경훈 댓글 2 좋아요 0 조회수 1414

헤로쿠가 더이상 무료가 아닌것 같습니다.

미해결

장박사의 블록체인 이해와 구조

작년 11월부터 유료로 바뀌었다고 하네요 Replit 으로 이용하고 있습니다.

  • dapp
  • 블록체인
한수호 댓글 1 좋아요 0 조회수 354

6분28 초 카테고리 부모와 자식

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

@ManyToOne @JoinColumn(name = "parent_id") private Category parent; @OneToMany(mappedBy = "parent") private List<Category> child = new ArrayList<>(); 부모와 자식을 이렇게 설정해준다는데, 부모를 Many To One 자식을 One To Many 로 해주는게 이해가 안갑니다. 왜 이렇게 연관관계를 설정해 줘야 하는건가요?

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
김지수 댓글 1 좋아요 1 조회수 831

프로퍼티와 메서드의 초기화 질문입니다.

미해결

자바 ORM 표준 JPA 프로그래밍 - 기본편

public class student { public int score; public int getScore() { return this.score; } } 위와 같은 코드가 있고 연관관계 매핑이 되어있어 현재 프록시 상태라고 가정했을 때 점수를 얻기 위해 student.score를 사용 하면 영속성 컨텍스트로부터 초기화를 받지 못하고, student.getScoret()를 하면 초기화를 받는 건가요 ? 만약 프로퍼티 접근을 사용했을 때 초기화를 받지 모한다면 studnet.score 안에는 무슨 값이 들어있게 되는 건가요 ?

  • java
  • jpa
댓글 1 좋아요 0 조회수 344

fetch join 과 EAGER

미해결

실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화

[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예 [질문 내용] 제가 이해한게 맞을까요? 일단 기본적으로 type을 LAZY 로 하는 이유는 조회할때 한 방에 다른 엔티티까지 쿼리가 나가고 그거에 연관된 엔티티까지 쿼리가 나가면 비효율 적이다. 그래서 LAZY 를 쓰는데 조회할때 다른 Entity 의 값도 가져오려면 LAZY 타입이니 쿼리가 많이 나가서 fetch JOIN 으로 한 쿼리로 연결 시킨다. 그러면 EAGER 바꾸면 될 것같지만, EAGER 는 예측할 수 없는 문제도 있고, 다른곳에서 조회할때는 또 다른 엔티티의 값이 필요가 없을 수도 있기 때문에 기본은 LAZY로 해두고 다른 엔티티의 값이 필요한 특수한 경우에만 fetch JOIN 을 한다.

  • java
  • spring
  • spring-boot
  • jpa
dionisos198 댓글 1 좋아요 1 조회수 429

와 진짜 대박이네요 디폴트 파라미터 하나로 이렇게 편해질수가 ㅜ

미해결

실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 자바 스프링에서는 테스트용 생성자 메서드가 있어도, 매번 일일히 null을 넣어준다거나 하는 문제점들이 있어서 결국 Builder를 사용했었는데 코틀린에서는 롬복 Builder가 지원되지 않는다고 해서 엄청 고민 중이였습니다 근데 이번 강의 보니까 그냥 온전한 객체 만들어주는 팩터리 메서드 하나 만들어놓고 테스트용으로 필요한 인자 값들만 설정해주면 되는 거였군요 진짜 미쳤다.. 갓틀린.. 잘 배워갑니다..

  • java
  • spring
  • kotlin
  • spring-boot
  • 리팩토링
euni 댓글 1 좋아요 1 조회수 343

연관관계 메서드의 위치는 핵심적으로 컨트롤 하는 쪽이 무슨 말일까요?

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

24분 30초부터 연관관계 메서드에 관련해서 설명해주시는데 연관관계 메서드의 위치는 핵심적으로 컨트롤 하는 쪽에 있는 것이 좋다 이게 무슨 말인지 잘 이해가 되지 않습니다 ㅠㅠ

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
댓글 1 좋아요 0 조회수 361

updateItem질문입니다.

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

@PostMapping("/items/{id}/edit") public String updateItem(@PathVariable Long id, @ModelAttribute Item item) { Item findItem = itemService.findById(item.getId()); //더티 체킹 findItem.setId(item.getId()); findItem.setName(item.getName()); findItem.setPrice(item.getPrice()); findItem.setStockQuantity(item.getStockQuantity()); findItem.setAuthor(item.getAuthor()); findItem.setIsbn(item.getIsbn()); return "redirect:/items"; } 강의를 보지 않고 스스로 코드를 짜보고 있는데 이렇게 하니까 수정내역이 반영 되지 않더라구요 스스로 생각해봤을 때는 다음 2가지 이유 중 하나일 것 같은데 이유가 이유가 무엇인가요 ㅠㅠ? findItem은 영속성 컨텍스트가 관리하지 않는 객체가 된 것이다. 따라서 더티체킹이 되지 않는다. 영속성 컨텍스트가 관리하는 엔티티는 맞지만 Controller에는 트랜잭션이 없어서 반영이 안되는 것이다.

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
댓글 1 좋아요 0 조회수 658

TypeError Web3Config 에러가 납니다 함수를 불러올 수 없음

미해결

[D.P.(DappProject)] 디앱 프로젝트(NFT 생성, NFT 구매 및 판매)

act_devtools_backend_compact.js:2367 TypeError: contracts web3Config__WEBPACK_IMPORTED_MODULE_1__.mintAnimalTokenContract.methods.getAnimalTokens is not a function at getAnimalTokens (my-animal.tsx:31:1) o remixd 사이트에서 정상적으로 실행되고 인수들도 console.log찍어봐도 문제 없습니다 const response = await mintAnimalTokenContract.methods .getAnimalTokens(account) .call(); 이런 간단한 함수도 실행이 되지않습니다 const balanceLength = await mintAnimalTokenContract.methods .balanceOf(account) .call(); 위 함수는 또 실행이 됩니다 바뀐거라곤 Node 14 -> 15로 변경한거 밖에 없는데 문제 사유가 될까요? npm 다시 재설치 했습니다

  • dapp
  • 블록체인
  • solidity
  • nft
APEX Bellboy 댓글 1 좋아요 0 조회수 491

@Param의 존재 이유>?

미해결

실전! 스프링 데이터 JPA

@EntityGraph(attributePaths = "team") List<Member> findEntityGraphByUsername(@Param("username")String username); 이번 강의를 복습하다 보니까 강사님께서 @Param을 사용하셨더라구요.(강의 20:59) findByAge(), findOptionalByUsername()과 같은 메소드는 @Param 애노테이션 없이도 잘 동작 했는데 따로 특별한 이유가 있는 것일까요?

  • java
  • spring
  • spring-boot
  • jpa
댓글 1 좋아요 1 조회수 535

인기 태그

인프런 TOP Writers

주간 인기글