Spring Boot Project for Beginners

  Рет қаралды 375,138

Telusko

Telusko

Күн бұрын

Пікірлер: 328
@mitodea
@mitodea 11 ай бұрын
00:04 We are building a quiz application using Spring Boot. 05:31 Create a REST controller to handle requests for all questions 16:28 Create a model class to represent the table columns 21:37 Create a Question DAO using Spring Data JPA for fetching data from the database 31:34 We can fetch questions by category and retrieve questions based on a specific category. 36:28 Create a method to add a question and return a success message 46:27 Handling exceptions and HTTP response status codes in the question service. 51:23 Handle exceptions and return response entities in controller and service methods. 1:01:17 Create a quiz and send data using a post request 1:06:13 Create a quiz with questions 1:16:03 Successfully created and fetched quiz data 1:21:06 Create a question wrapper class to exclude irrelevant data from the quiz response 1:31:18 Create a method in the controller to submit a quiz and calculate the score. 1:36:33 Created a method in the service for calculating quiz responses
@pranchalgupta2370
@pranchalgupta2370 Жыл бұрын
DATABASE for this project CREATE TABLE Question ( id SERIAL PRIMARY KEY, question_title TEXT NOT NULL, option1 TEXT NOT NULL, option2 TEXT NOT NULL, option3 TEXT NOT NULL, option4 TEXT NOT NULL, right_answer TEXT NOT NULL, difficulty_level TEXT NOT NULL, category TEXT NOT NULL ); INSERT INTO Question (question_title, option1, option2, option3, option4, right_answer, difficulty_level, category) VALUES ('What is a class in Java?', 'A function', 'An object', 'A data structure', 'A loop', 'An object', 'Easy', 'java'), ('What does OOP stand for?', 'Object-Oriented Programming', 'Object Ordering Process', 'Operating Overloaded Pointers', 'Order of Operations', 'Object-Oriented Programming', 'Easy', 'java'), ('What is a list in Python?', 'A type of loop', 'A built-in function', 'A data structure', 'An object', 'A data structure', 'Easy', 'python'), ('Which data structure uses First-In-First-Out (FIFO) order?', 'Stack', 'Queue', 'Array', 'LinkedList', 'Queue', 'Medium', 'python'), ('What is a constructor?', 'A member of a class', 'A loop in Python', 'A data type', 'A special method', 'A special method', 'Medium', 'java'), ('Which sorting algorithm has the worst-case time complexity of O(n^2)?', 'Merge Sort', 'Quick Sort', 'Insertion Sort', 'Bubble Sort', 'Bubble Sort', 'Hard', 'python'), ('In Java, what is used to create an instance of a class?', 'Class', 'Method', 'Object', 'Constructor', 'Constructor', 'Easy', 'java'), ('Which keyword is used to define a variable that won’t be reassigned?', 'static', 'final', 'constant', 'immutable', 'final', 'Easy', 'java'), ('What is the output of 4 ^ 3 in Python?', '7', '64', '81', '12', '64', 'Easy', 'python'), ('What does the term "polymorphism" refer to in programming?', 'Using multiple inheritance', 'Ability to take multiple forms', 'Manipulating data', 'Using multiple programming languages', 'Ability to take multiple forms', 'Medium', 'java'), ('What is the purpose of the "self" parameter in Python class methods?', 'It refers to the current instance of the class', 'It is used to call parent class methods', 'It is a keyword for loops', 'It is a data type', 'It refers to the current instance of the class', 'Medium', 'python'), ('Which of the following is not a primitive data type in Java?', 'int', 'boolean', 'char', 'string', 'string', 'Medium', 'java'), ('What is the time complexity of a binary search?', 'O(n)', 'O(log n)', 'O(n^2)', 'O(1)', 'O(log n)', 'Medium', 'python'), ('What keyword is used to inherit a class in Python?', 'extends', 'inherits', 'super', 'class', 'class', 'Easy', 'python'), ('Which type of loop is ideal for situations where the number of iterations is known?', 'for loop', 'while loop', 'do-while loop', 'until loop', 'for loop', 'Easy', 'java'), ('What is the purpose of "import" in Python?', 'To export data', 'To create a backup', 'To include external modules', 'To print output', 'To include external modules', 'Easy', 'python'), ('In Java, which access modifier provides the widest visibility?', 'public', 'private', 'protected', 'package-private', 'public', 'Easy', 'java'), ('What is a lambda function in Python?', 'A function that uses the "lambda" keyword', 'A function with multiple return values', 'A function with no parameters', 'An anonymous inline function', 'An anonymous inline function', 'Medium', 'python'), ('What is a linked list?', 'A type of array', 'A linear data structure', 'A collection of objects', 'A group of classes', 'A linear data structure', 'Medium', 'java'), ('Which operator is used to concatenate strings in Python?', '&', '+', '*', '++', '+', 'Easy', 'python'), ('What does JVM stand for?', 'Java Virtual Machine', 'Just Virtual Memory', 'JavaScript Virtual Machine', 'Java Version Manager', 'Java Virtual Machine', 'Easy', 'java'), ('In Python, what is the main difference between a tuple and a list?', 'Tuples are mutable, lists are not', 'Lists are ordered, tuples are not', 'Tuples can store mixed data types, lists cannot', 'Lists have a fixed size, tuples do not', 'Tuples can store mixed data types, lists cannot', 'Medium', 'python'), ('What is the purpose of the "finally" block in a try-catch-finally statement?', 'To handle exceptions', 'To define a fallback value', 'To execute code regardless of exceptions', 'To terminate the program', 'To execute code regardless of exceptions', 'Medium', 'java'), ('What is a dictionary in Python?', 'A sorted collection of elements', 'A data structure used for searching', 'An ordered sequence of elements', 'A key-value store', 'A key-value store', 'Easy', 'python'), ('Which keyword is used to define a subclass in Java?', 'child', 'extends', 'inherits', 'subclass', 'extends', 'Easy', 'java'), ('What is the purpose of the "pass" statement in Python?', 'To stop the execution of a loop', 'To indicate an empty code block', 'To raise an exception', 'To terminate the program', 'To indicate an empty code block', 'Easy', 'python'); select * from "Question"
@aabhasjain96
@aabhasjain96 11 ай бұрын
Thanks Man ✌✌
@modhugumudiushasri2330
@modhugumudiushasri2330 10 ай бұрын
Thanks a lot
@virajsandakelum7900
@virajsandakelum7900 10 ай бұрын
Thankz
@kapkarakartal55
@kapkarakartal55 9 ай бұрын
Thank you so much bro . If you use this sql codes to create your database keep attention while try to create findByCategory method . Category names are lowercase in this sql code but in the video lecturer have uppercase category name at own db .If you try to search with uppercase postman will give you an empty list . I spent lots of time to realize that . maybe you can save your time .
@htetphyoemaung5115
@htetphyoemaung5115 9 ай бұрын
Thank Man
@nachiketnijap6990
@nachiketnijap6990 9 ай бұрын
You are master of your art respect ++
@anuragprajapati3712
@anuragprajapati3712 3 ай бұрын
Amazing explanation 😉.Thanks for giving such type of video
@aldrindelossantos7995
@aldrindelossantos7995 4 ай бұрын
I would like to say thank you to Telusko and your channel. This tutorial about spring has helped and prepared me for a job opportunity for a company that I was aiming for. And now they have sent me an offer that I'm about to sign. Thank you Telusko. More power to you.
@balajiwagh8807
@balajiwagh8807 4 ай бұрын
Bro can u guide me
@RKARAN-zs5zn
@RKARAN-zs5zn Жыл бұрын
CREATE TABLE "question" ( "id" SERIAL PRIMARY KEY, "category" VARCHAR(25), "difficulty_level" VARCHAR(25), "option1" VARCHAR(255), "option2" VARCHAR(255), "option3" VARCHAR(255), "option4" VARCHAR(255), "question_title" VARCHAR(255), "correct_answer" VARCHAR(255) ); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Geography', 'Easy', 'What is the capital of France?', 'Paris', 'London', 'Rome', 'Berlin', 'Paris'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Literature', 'Medium', 'Who wrote the novel "Moby Dick"?', 'Herman Melville', 'Mark Twain', 'Charles Dickens', 'Leo Tolstoy', 'Herman Melville'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Math', 'Hard', 'What is the square root of 16?', '4', '8', '12', '16', '4'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Science', 'Easy', 'What is the name of the largest planet in the solar system?', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'Jupiter'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('History', 'Medium', 'What was the name of the first world war?', 'World War I', 'World War II', 'The Great War', 'The War to End All Wars', 'World War I');
@sur8116
@sur8116 Жыл бұрын
Thanks 🙏🏿
@ArjunU931
@ArjunU931 Жыл бұрын
thanksssss
@siddharthkhandelwal933
@siddharthkhandelwal933 Жыл бұрын
Thank You So Much
@aman_
@aman_ Жыл бұрын
Here is the adjusted query CREATE TABLE "question" ( "id" SERIAL PRIMARY KEY, "category" VARCHAR(25), "difficulty_level" VARCHAR(25), "option1" VARCHAR(255), "option2" VARCHAR(255), "option3" VARCHAR(255), "option4" VARCHAR(255), "question_title" VARCHAR(255), "correct_answer" VARCHAR(255) ); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Geography', 'Easy', 'Paris', 'London', 'Rome', 'Berlin', 'What is the capital of France?', 'Paris'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Literature', 'Medium', 'Herman Melville', 'Mark Twain', 'Charles Dickens', 'Leo Tolstoy', 'Who wrote the novel "Moby Dick"?', 'Herman Melville'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Math', 'Hard', '4', '8', '12', '16', 'What is the square root of 16?', '4'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('Science', 'Easy', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'What is the name of the largest planet in the solar system?', 'Jupiter'); INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('History', 'Medium', 'World War I', 'World War II', 'The Great War', 'The War to End All Wars', 'What was the name of the first world war?', 'World War I');
@dharmeshkumarsahoo9370
@dharmeshkumarsahoo9370 Жыл бұрын
@@aman_ Thanks for the help 😘😘🥰
@mohsenshamohammadi
@mohsenshamohammadi Жыл бұрын
Thank you that was great. The only problem is that by this implementation on the quiz submit, the order of responses are important If you change the order of your responses, the index will be different from the questions array, the calculateResult function cannot return the right answer
@aseelkp10
@aseelkp10 Жыл бұрын
yeah , i got the same issue , why its happening
@SahilKhan-iu8oq
@SahilKhan-iu8oq Жыл бұрын
from where to copy your sql code? please provide somewhere so that we could save some of the time
@sauravgheewala8373
@sauravgheewala8373 8 ай бұрын
1:14:54 Hear Write Rand() insted of Random() Cause Random() is not working properly... Thank You Navin Sir You Inspire me a lot......
@harshitgupta1034
@harshitgupta1034 7 ай бұрын
still not working
@sauravgheewala8373
@sauravgheewala8373 7 ай бұрын
@@harshitgupta1034 what query you wrote ?
@shanesanal4616
@shanesanal4616 4 ай бұрын
@@sauravgheewala8373 did you resolve the issue? this is what I wrote @Query(value = "SELECT * FROM question WHERE question.category =:category ORDER BY random() LIMIT :numQ", nativeQuery = true) List findRandomQuestionsByCategory(String category,int numQ); random questions are not getting generated ); .
@pb11608
@pb11608 2 ай бұрын
@@sauravgheewala8373 @Query(value = "SELECT * FROM question q Where q.category =:category ORDER BY RAND() LIMIT :numQ", nativeQuery = true), getting an error here at LIMIT
@srinivasdokare4274
@srinivasdokare4274 27 күн бұрын
Damn I was breaking my head since last 2 days for this..after using Rand() the code is working fine now.
@markogavrilovic2583
@markogavrilovic2583 Жыл бұрын
More Spring Boot projects please!
@SachinAG-d2g
@SachinAG-d2g Жыл бұрын
helped in many ways thank you so much ,remembered forever
@akmalamien4958
@akmalamien4958 Жыл бұрын
This is so fun ! thanks bro
@eashan2405
@eashan2405 8 ай бұрын
CREATE TABLE Question ( id SERIAL PRIMARY KEY, question_title TEXT NOT NULL, option1 TEXT NOT NULL, option2 TEXT NOT NULL, option3 TEXT NOT NULL, option4 TEXT NOT NULL, right_answer TEXT NOT NULL, difficulty_level TEXT NOT NULL, category TEXT NOT NULL ); INSERT INTO Question (question_title, option1, option2, option3, option4, right_answer, difficulty_level, category) VALUES ('What is a class in Java?', 'A function', 'An object', 'A data structure', 'A loop', 'An object', 'Easy', 'java'), ('What does OOP stand for?', 'Object-Oriented Programming', 'Object Ordering Process', 'Operating Overloaded Pointers', 'Order of Operations', 'Object-Oriented Programming', 'Easy', 'java'), ('What is a list in Python?', 'A type of loop', 'A built-in function', 'A data structure', 'An object', 'A data structure', 'Easy', 'python'), ('Which data structure uses First-In-First-Out (FIFO) order?', 'Stack', 'Queue', 'Array', 'LinkedList', 'Queue', 'Medium', 'python'), ('What is a constructor?', 'A member of a class', 'A loop in Python', 'A data type', 'A special method', 'A special method', 'Medium', 'java'), ('Which sorting algorithm has the worst-case time complexity of O(n^2)?', 'Merge Sort', 'Quick Sort', 'Insertion Sort', 'Bubble Sort', 'Bubble Sort', 'Hard', 'python'), ('In Java, what is used to create an instance of a class?', 'Class', 'Method', 'Object', 'Constructor', 'Constructor', 'Easy', 'java'), ('Which keyword is used to define a variable that won’t be reassigned?', 'static', 'final', 'constant', 'immutable', 'final', 'Easy', 'java'), ('What is the output of 4 ^ 3 in Python?', '7', '64', '81', '12', '64', 'Easy', 'python'), ('What does the term "polymorphism" refer to in programming?', 'Using multiple inheritance', 'Ability to take multiple forms', 'Manipulating data', 'Using multiple programming languages', 'Ability to take multiple forms', 'Medium', 'java'), ('What is the purpose of the "self" parameter in Python class methods?', 'It refers to the current instance of the class', 'It is used to call parent class methods', 'It is a keyword for loops', 'It is a data type', 'It refers to the current instance of the class', 'Medium', 'python'), ('Which of the following is not a primitive data type in Java?', 'int', 'boolean', 'char', 'string', 'string', 'Medium', 'java'), ('What is the time complexity of a binary search?', 'O(n)', 'O(log n)', 'O(n^2)', 'O(1)', 'O(log n)', 'Medium', 'python'), ('What keyword is used to inherit a class in Python?', 'extends', 'inherits', 'super', 'class', 'class', 'Easy', 'python'), ('Which type of loop is ideal for situations where the number of iterations is known?', 'for loop', 'while loop', 'do-while loop', 'until loop', 'for loop', 'Easy', 'java'), ('What is the purpose of "import" in Python?', 'To export data', 'To create a backup', 'To include external modules', 'To print output', 'To include external modules', 'Easy', 'python'), ('In Java, which access modifier provides the widest visibility?', 'public', 'private', 'protected', 'package-private', 'public', 'Easy', 'java'), ('What is a lambda function in Python?', 'A function that uses the "lambda" keyword', 'A function with multiple return values', 'A function with no parameters', 'An anonymous inline function', 'An anonymous inline function', 'Medium', 'python'), ('What is a linked list?', 'A type of array', 'A linear data structure', 'A collection of objects', 'A group of classes', 'A linear data structure', 'Medium', 'java'), ('Which operator is used to concatenate strings in Python?', '&', '+', '*', '++', '+', 'Easy', 'python'), ('What does JVM stand for?', 'Java Virtual Machine', 'Just Virtual Memory', 'JavaScript Virtual Machine', 'Java Version Manager', 'Java Virtual Machine', 'Easy', 'java'), ('In Python, what is the main difference between a tuple and a list?', 'Tuples are mutable, lists are not', 'Lists are ordered, tuples are not', 'Tuples can store mixed data types, lists cannot', 'Lists have a fixed size, tuples do not', 'Tuples can store mixed data types, lists cannot', 'Medium', 'python'), ('What is the purpose of the "finally" block in a try-catch-finally statement?', 'To handle exceptions', 'To define a fallback value', 'To execute code regardless of exceptions', 'To terminate the program', 'To execute code regardless of exceptions', 'Medium', 'java'), ('What is a dictionary in Python?', 'A sorted collection of elements', 'A data structure used for searching', 'An ordered sequence of elements', 'A key-value store', 'A key-value store', 'Easy', 'python'), ('Which keyword is used to define a subclass in Java?', 'child', 'extends', 'inherits', 'subclass', 'extends', 'Easy', 'java'), ('What is the purpose of the "pass" statement in Python?', 'To stop the execution of a loop', 'To indicate an empty code block', 'To raise an exception', 'To terminate the program', 'To indicate an empty code block', 'Easy', 'python'); select * from "Question"
@shouryareddy6138
@shouryareddy6138 6 ай бұрын
Thanks alot.
@harithabandara3212
@harithabandara3212 4 ай бұрын
Thank you!!!
@aakarshsrivastava2546
@aakarshsrivastava2546 Жыл бұрын
Sir from where we will get the database . Please provide any link to access the database of the quiz app
@goddy510
@goddy510 Жыл бұрын
I’m attending a bootcamp and currently going through spring boot. This is perfect timing and helps to reinforce the material. Thanks Navin the master Alien❤
@deepakt4737
@deepakt4737 Жыл бұрын
which boot camp are you joining , can u please share ?
@kafychannel
@kafychannel Жыл бұрын
Is it Vlad Mishustin's bootcamp? :))
@deepakt4737
@deepakt4737 Жыл бұрын
@@kafychannel where can i get the links for it
@challasaibhanuteja5314
@challasaibhanuteja5314 Жыл бұрын
if anyone getting following error its due to wrongly setup database table and primary key not being present in the table- org.hibernate.assertionfailure: null identifier use following query to create question table CREATE TABLE question ( id SERIAL PRIMARY KEY, question_title varchar, option1 varchar, option2 varchar, option3 varchar, option4 varchar, right_answer varchar, difficulty_level varchar, category varchar );
@raviprakashreddy8128
@raviprakashreddy8128 Жыл бұрын
Excellent beginners project and this will make to develope microservices as well, one thing gap for better understanding is UI, if you upload UI for this project it will very helpful to the students for better understanding
@nostalgiacademy7378
@nostalgiacademy7378 10 ай бұрын
I am using MySQL for my database instead of PostgreSQL, and I already have a table with values pre-populated as yours is. However, when I execute my program as you do at 27:38, I get an error saying "Error executing DDL 'create table ...'table 'mytablename' already exists. Please someone help I believe it's trying to create a new table of the same name as my current table in mysql, instead of accessing it to display the values in the browser.
@vidyashree.s.d2216
@vidyashree.s.d2216 10 ай бұрын
check ur application properties once and name of the column in db
@pendyalakedhareeswar9753
@pendyalakedhareeswar9753 9 ай бұрын
In my case it was the same , it has created a new table ,later i have changed the table and also the question entity ,it resolved the error
@aniketgeet1520
@aniketgeet1520 Жыл бұрын
SIR CAN U PLEASE WORK ON PLAYLISTS SO THAT IN PLAYLIST SECTION WE CAN FIND ALL VIDEOS IN ONCE PLACE
@jayasrikirubanandam8693
@jayasrikirubanandam8693 Жыл бұрын
Do anyone facing this issue? Not able to use setter methods like setTitle , setQuestions while creating a quiz table despite of having lombok dependencies
@shubhamsharma-xs4oo
@shubhamsharma-xs4oo Жыл бұрын
Use @Data in model class
@rsssl
@rsssl 6 ай бұрын
same here. How did you manage to solve it?
@karunakaryadav3168
@karunakaryadav3168 5 ай бұрын
help me with this error
@someshsahu4638
@someshsahu4638 Жыл бұрын
Very nice and deep explanation i learnt a lot from this video thank you so much sir 🙏🏼🙏🏼🙏🏼
@samikshyasahoo9010
@samikshyasahoo9010 2 ай бұрын
My questions are not appearing it's giving me a null list. What should I do.
@kalairoxan2398
@kalairoxan2398 Ай бұрын
Same HERE 1:18:08 did fix it ma'am
@osamapathan-u2c
@osamapathan-u2c 19 күн бұрын
dont use lambok. create getter setters toString manually
@nikitajagtap9803
@nikitajagtap9803 9 ай бұрын
Wow! Very well explained and covered all the topics with clarity!
@ApsanaMohammad
@ApsanaMohammad 3 ай бұрын
thank you
@SanthoshKumar-jv8kt
@SanthoshKumar-jv8kt 6 ай бұрын
Nice video sir. But instead of creating QuestionWrapper class, create a another contructor without having right answer, category,difficulty level in Question class and we can use that ?
@ridmadissanayake5201
@ridmadissanayake5201 8 ай бұрын
Here is the SQL query for a postgresql db for this project with example data(all hail the ai overlords :) ): DROP TABLE IF EXISTS "question"; CREATE TABLE "question" ( "id" SERIAL PRIMARY KEY, "category" VARCHAR(25) DEFAULT NULL, "difficulty_level" VARCHAR(25) DEFAULT NULL, "option1" VARCHAR(2550) DEFAULT NULL, "option2" VARCHAR(2550) DEFAULT NULL, "option3" VARCHAR(2550) DEFAULT NULL, "option4" VARCHAR(2550) DEFAULT NULL, "question_title" VARCHAR(2550) DEFAULT NULL, "correct_answer" VARCHAR(1) DEFAULT NULL ); -- Question 1 INSERT INTO "question" (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'EASY', 'A. A constant value', 'B. A reserved keyword', 'C. A container for storing data', 'D. A loop control structure', 'What is a variable in Java?', 'C'); -- Question 2 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'EASY', 'A. True', 'B. False', 'C. None', 'D. Both A and B', 'Is Python a dynamically typed language?', 'A'); -- Question 3 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'MEDIUM', 'A. 8', 'B. 16', 'C. 32', 'D. 64', 'How many bits are in a Java long data type?', 'D'); -- Question 4 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'MEDIUM', 'A. Function', 'B. Class', 'C. Method', 'D. Variable', 'What is a group of related statements that perform a specific task in Python?', 'A'); -- Question 5 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'HARD', 'A. Encapsulation', 'B. Polymorphism', 'C. Inheritance', 'D. Abstraction', 'Which OOP concept allows restricting access to certain members of a class?', 'A'); -- Question 6 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'EASY', 'A. List', 'B. Set', 'C. Tuple', 'D. Dictionary', 'Which data type in Python is ordered and mutable?', 'A'); -- Question 7 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'MEDIUM', 'A. ArrayList', 'B. LinkedList', 'C. HashSet', 'D. TreeMap', 'Which Java collection stores elements in a sorted order?', 'D'); -- Question 8 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'HARD', 'A. Recursion', 'B. Iteration', 'C. Abstraction', 'D. Encapsulation', 'What is the process in which a function calls itself directly or indirectly?', 'A'); -- Question 9 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'EASY', 'A. JVM', 'B. JRE', 'C. JDK', 'D. JAR', 'Which component is responsible for executing Java programs?', 'A'); -- Question 10 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'MEDIUM', 'A. Pass by Value', 'B. Pass by Reference', 'C. Pass by Object', 'D. Pass by Assignment', 'How are arguments passed to functions in Python?', 'C'); -- Question 11 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'HARD', 'A. Checked Exception', 'B. Unchecked Exception', 'C. Runtime Exception', 'D. Compile-time Exception', 'Which type of exception is not required to be caught or declared?', 'B'); -- Question 12 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'EASY', 'A. Class', 'B. Object', 'C. Module', 'D. Package', 'In Python, what is an instance of a class called?', 'B'); -- Question 13 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'MEDIUM', 'A. 127', 'B. 255', 'C. 32767', 'D. 2147483647', 'What is the maximum value that can be stored in a Java byte data type?', 'A'); -- Question 14 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'HARD', 'A. Class', 'B. Function', 'C. Module', 'D. Package', 'In Python, which one is a reusable piece of code that encapsulates attributes and behaviors?', 'A'); -- Question 15 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('JAVA', 'EASY', 'A. String', 'B. StringBuilder', 'C. StringBuffer', 'D. Character', 'Which Java class is used for mutable string manipulation?', 'B'); -- Question 16 INSERT INTO question (category, difficulty_level, option1, option2, option3, option4, question_title, correct_answer) VALUES ('PYTHON', 'MEDIUM', 'A. for loop', 'B. while loop', 'C. do-while loop', 'D. foreach loop', 'In Python, which loop is used for iterating over a sequence?', 'B');
@nareshrathnam
@nareshrathnam 8 ай бұрын
I want that sql table.. can you upload that also in git, Naveen?
@Javadeveloper-rn5io
@Javadeveloper-rn5io 8 ай бұрын
so beautiful so elegent just looking like a Jhonny Sins
@isaacreyes4915
@isaacreyes4915 8 ай бұрын
Hm, would you say the entire "Restful web services in Java" playlist is still relevant even though it is 6 years old?
@christhelemaque4187
@christhelemaque4187 Жыл бұрын
Whats the difference between @RestController vs @Controller
@sreelatha5274
@sreelatha5274 Жыл бұрын
For post method with category in question controller used pathvariable but in quiz controller used requestparam is there any specific reson behind this?
@jayasrikirubanandam8693
@jayasrikirubanandam8693 Жыл бұрын
Hi any help would be appreciated !! GOT STUCK , I am not getting questions in quiz_questions table? Used the same query not able to fetch questions?
@harshitgupta1034
@harshitgupta1034 7 ай бұрын
facing same issue, any solution?
@avinashchoudhary9085
@avinashchoudhary9085 7 ай бұрын
Any solution ?
@pirateluffy7365
@pirateluffy7365 3 ай бұрын
same issue im getting only {} as response. data is not getting fetched. but not getting any errors also.
@tharunvenkadeshm650
@tharunvenkadeshm650 4 ай бұрын
1:10:30 - Why are we using @ManyToMany annotation instead of @OneToMany in the Quiz class. It should be @OneToMany right ? coz in one quiz there will be many questions ryt ? but the vice versa is not possible.
@motivationalart506
@motivationalart506 Жыл бұрын
can you provide the data you are using so that we can use the same data?
@PrabinManShrestha
@PrabinManShrestha Жыл бұрын
For MYSQL database : create database if not exists questiondb; use questiondb; CREATE TABLE question ( id SERIAL PRIMARY KEY, category VARCHAR(255), difficultylevel VARCHAR(255), option1 VARCHAR(255), option2 VARCHAR(255), option3 VARCHAR(255), option4 VARCHAR(255), question_title VARCHAR(255), right_answer VARCHAR(255) ); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('1', 'JAVA', 'Easy', 'class', 'interface', 'extends', 'implements', 'Which Java keyword is used to create a subclass?', 'extends'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('2', 'Java', 'Easy', '4', '5', '6', 'Compile error', 'What is the output of the following Java code snippet?', '5'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('3', 'Java', 'Easy', 'TRUE', 'TRUE', '0', 'null', 'In Java, what is the default value of an uninitialized boolean variable?', 'FALSE'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('4', 'Java', 'Easy', 'throw', 'try', 'catch', 'finally', 'Which Java keyword is used to explicitly throw an exception?', 'throw'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('5', 'Java', 'Easy', 'It indicates that a variable is constant.', 'It indicates that a variable is constant.', 'It indicates that a class cannot be extended.', 'It indicates that a variable is of primitive type.', 'What does the static keyword mean in Java?', 'It indicates that a method can be accessed without creating an instance of'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('6', 'Java', 'Easy', 'constant int x = 5;', 'final int x = 5;', 'static int x = 5;', 'readonly int x = 5.', 'What is the correct way to declare a constant variable in Java?', 'final int x = 5;'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('7', 'Java', 'Easy', 'for loop', 'while loop', 'do-while loop', 'switch loop', 'Which loop in Java allows the code to be executed at least once?', 'do-while loop'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('8', 'Java', 'Easy', 'To terminate a loop or switch statement and transfer control to the next stateme....', 'To skip the rest of the code in a loop and move to the next iteration.', 'To define a label for a loop or switch statement', 'To check a condition and execute a block of code repeated', 'What is the purpose of the \'break\' statement in Java?', 'To terminate a loop or switch statement and transfer control to the next statement'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('9', 'Java', 'Easy', '+', '-', '*', '/', 'Which Java operator is used to concatenate two strings?', '*'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('10', 'Java', 'Easy', 'HashMap', 'ArrayList', 'LinkedList', 'HashSet', 'In Java, which collection class provides an implementation of a dynamic array?', 'ArrayList'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('11', 'Python', 'Easy', 'count()', 'size()', 'length()', 'len()', 'Which Python function is used to calculate the length of a list?', 'Len ()'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('12', 'Python', 'Easy', '[1,2,3]', '[1,2,3,4]', '[4,3,2,11]', 'Error', 'What is the output of the following Python code snippet?', '[1,2,3,4]'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('13', 'Python', 'Easy', 'break', 'continue', 'pass', 'return', 'Which Python statement is used to exit from a loop prematurely?', 'break'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('14', 'Python', 'Easy', 'To generate a random number within a given range.', 'To iterate over a sequence of numbers.', 'To sort a list in ascending order.', 'To calculate the length of a string', 'What is the purpose of the range () function in Python?', 'To iterate over a sequence of numbers.'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('15', 'Python', 'Python', 'int', 'float', '|str', 'List', 'In Python, which data type is mutable?', 'List'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('16', 'Python', 'Python', 'datetime', 'math', 'os', 'sys', 'Which Python module is used for working with dates and times?', 'datetime');
@unknownbiri
@unknownbiri 9 ай бұрын
Amazing video. Thank you so much! This video really made me confident in the beginning of learning back end dev with Java.
@srinivasdokare4274
@srinivasdokare4274 27 күн бұрын
⚠⚠I'm not able to run the nativeQuery for mySql database, while I'm trying to execute the same nativeQuery, is that because the mySql doesn't support parameter binding for LIMIT.. Anyone please help.
@allenvarughese1433
@allenvarughese1433 9 ай бұрын
at 1:11:50 why are we using ' Quiz quiz = new Quiz(); ' ie.e manually creating quiz object; can't we autowire the quiz object.?
@PulkitArora-f4p
@PulkitArora-f4p 7 ай бұрын
Why I have to make getter and setter when setTitle is used as use lambok ??
@Bhaveshkorane
@Bhaveshkorane 2 күн бұрын
from where do i get the data to insert into the database I have created the database but don't have the data
@shivamjha3663
@shivamjha3663 3 ай бұрын
It's not for Beginners - First Learn PostgreSQL Second Learn Spring Boot Then you can follow up with this project
@AkshayKumar-cl8js
@AkshayKumar-cl8js 7 ай бұрын
Hey, why the controller not get instantiated when I created in different package but using it in a package which has main class it works fine. Can anybody help on this ?
@SuperChikna
@SuperChikna 6 ай бұрын
Same issue I am also getting. I remember fixing this long back but now I forgot again :D
@dineshdr1353
@dineshdr1353 Жыл бұрын
❤❤❤osm explanations
@codingfrommumbai9610
@codingfrommumbai9610 Жыл бұрын
Thanks a lot sir
@subhashreddy4624
@subhashreddy4624 Жыл бұрын
when i created the quiz using category, numQ and title. I am getting empty quiz_questions table. I have used MySQL for backend Please suggest me solution.
@TheGlamVibe
@TheGlamVibe 11 ай бұрын
//This resolved this issue for me - import jakarta.persistence.JoinColumn; @ManyToMany @JoinTable( name = "quiz_questions", // Name of the join table joinColumns = { @JoinColumn(name = "quiz_id") // Array of JoinColumn annotations }, inverseJoinColumns = { @JoinColumn(name = "question_id") // Array of JoinColumn annotations } ) private List questions;
@Nelipson
@Nelipson Жыл бұрын
Lombok @Data doesn't work on my machine, becouse you need install it and do project maven update.
@suneramunasinghe
@suneramunasinghe 5 ай бұрын
Same, I manually generated getters and setters since using @Data from lombok just ouputted an empty list.
@keronz202
@keronz202 9 ай бұрын
I got the same error here is the solution. I want to contribute in open source. For MYSQL database : create database if not exists questiondb; use questiondb; CREATE TABLE question ( id SERIAL PRIMARY KEY, category VARCHAR(255), difficultylevel VARCHAR(255), option1 VARCHAR(255), option2 VARCHAR(255), option3 VARCHAR(255), option4 VARCHAR(255), question_title VARCHAR(255), right_answer VARCHAR(255) ); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('1', 'JAVA', 'Easy', 'class', 'interface', 'extends', 'implements', 'Which Java keyword is used to create a subclass?', 'extends'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('2', 'Java', 'Easy', '4', '5', '6', 'Compile error', 'What is the output of the following Java code snippet?', '5'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('3', 'Java', 'Easy', 'TRUE', 'TRUE', '0', 'null', 'In Java, what is the default value of an uninitialized boolean variable?', 'FALSE'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('4', 'Java', 'Easy', 'throw', 'try', 'catch', 'finally', 'Which Java keyword is used to explicitly throw an exception?', 'throw'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('5', 'Java', 'Easy', 'It indicates that a variable is constant.', 'It indicates that a variable is constant.', 'It indicates that a class cannot be extended.', 'It indicates that a variable is of primitive type.', 'What does the static keyword mean in Java?', 'It indicates that a method can be accessed without creating an instance of'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('6', 'Java', 'Easy', 'constant int x = 5;', 'final int x = 5;', 'static int x = 5;', 'readonly int x = 5.', 'What is the correct way to declare a constant variable in Java?', 'final int x = 5;'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('7', 'Java', 'Easy', 'for loop', 'while loop', 'do-while loop', 'switch loop', 'Which loop in Java allows the code to be executed at least once?', 'do-while loop'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('8', 'Java', 'Easy', 'To terminate a loop or switch statement and transfer control to the next stateme....', 'To skip the rest of the code in a loop and move to the next iteration.', 'To define a label for a loop or switch statement', 'To check a condition and execute a block of code repeated', 'What is the purpose of the \'break\' statement in Java?', 'To terminate a loop or switch statement and transfer control to the next statement'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('9', 'Java', 'Easy', '+', '-', '*', '/', 'Which Java operator is used to concatenate two strings?', '*'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('10', 'Java', 'Easy', 'HashMap', 'ArrayList', 'LinkedList', 'HashSet', 'In Java, which collection class provides an implementation of a dynamic array?', 'ArrayList'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('11', 'Python', 'Easy', 'count()', 'size()', 'length()', 'len()', 'Which Python function is used to calculate the length of a list?', 'Len ()'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('12', 'Python', 'Easy', '[1,2,3]', '[1,2,3,4]', '[4,3,2,11]', 'Error', 'What is the output of the following Python code snippet?', '[1,2,3,4]'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('13', 'Python', 'Easy', 'break', 'continue', 'pass', 'return', 'Which Python statement is used to exit from a loop prematurely?', 'break'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('14', 'Python', 'Easy', 'To generate a random number within a given range.', 'To iterate over a sequence of numbers.', 'To sort a list in ascending order.', 'To calculate the length of a string', 'What is the purpose of the range () function in Python?', 'To iterate over a sequence of numbers.'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('15', 'Python', 'Python', 'int', 'float', '|str', 'List', 'In Python, which data type is mutable?', 'List'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('16', 'Python', 'Python', 'datetime', 'math', 'os', 'sys', 'Which Python module is used for working with dates and times?', 'datetime');
@shobasolligi
@shobasolligi 7 ай бұрын
Can anyone share the csv file(Questions & QUIZ) don't see that in Description
@Codewithbenki
@Codewithbenki 8 ай бұрын
CREATE TABLE IF NOT EXISTS question ( id SERIAL PRIMARY KEY, category VARCHAR(25), difficulty_level VARCHAR(25), option1 VARCHAR(255), option2 VARCHAR(255), option3 VARCHAR(255), option4 VARCHAR(255), question_title VARCHAR(255), correct_answer VARCHAR(255) );
@alfiyamn4119
@alfiyamn4119 Жыл бұрын
how to add the path in requestmapping? like @Requestmapping(path) I am completely new to spring boot.
@manikantakattunga6104
@manikantakattunga6104 Жыл бұрын
Failed to create query for method public abstract java.util.List com.Questions.DAO.Question_Dao.findRandomQuestionByCategoryAndnumQ(java.lang.String,int); No property 'andnumQ' found for type 'String'; Traversed path: Questions.category. please explain this
@akmalamien4958
@akmalamien4958 Жыл бұрын
where can i get the database
@PrabinManShrestha
@PrabinManShrestha Жыл бұрын
For MYSQL database : create database if not exists questiondb; use questiondb; CREATE TABLE question ( id SERIAL PRIMARY KEY, category VARCHAR(255), difficultylevel VARCHAR(255), option1 VARCHAR(255), option2 VARCHAR(255), option3 VARCHAR(255), option4 VARCHAR(255), question_title VARCHAR(255), right_answer VARCHAR(255) ); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('1', 'JAVA', 'Easy', 'class', 'interface', 'extends', 'implements', 'Which Java keyword is used to create a subclass?', 'extends'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('2', 'Java', 'Easy', '4', '5', '6', 'Compile error', 'What is the output of the following Java code snippet?', '5'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('3', 'Java', 'Easy', 'TRUE', 'TRUE', '0', 'null', 'In Java, what is the default value of an uninitialized boolean variable?', 'FALSE'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('4', 'Java', 'Easy', 'throw', 'try', 'catch', 'finally', 'Which Java keyword is used to explicitly throw an exception?', 'throw'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('5', 'Java', 'Easy', 'It indicates that a variable is constant.', 'It indicates that a variable is constant.', 'It indicates that a class cannot be extended.', 'It indicates that a variable is of primitive type.', 'What does the static keyword mean in Java?', 'It indicates that a method can be accessed without creating an instance of'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('6', 'Java', 'Easy', 'constant int x = 5;', 'final int x = 5;', 'static int x = 5;', 'readonly int x = 5.', 'What is the correct way to declare a constant variable in Java?', 'final int x = 5;'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('7', 'Java', 'Easy', 'for loop', 'while loop', 'do-while loop', 'switch loop', 'Which loop in Java allows the code to be executed at least once?', 'do-while loop'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('8', 'Java', 'Easy', 'To terminate a loop or switch statement and transfer control to the next stateme....', 'To skip the rest of the code in a loop and move to the next iteration.', 'To define a label for a loop or switch statement', 'To check a condition and execute a block of code repeated', 'What is the purpose of the \'break\' statement in Java?', 'To terminate a loop or switch statement and transfer control to the next statement'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('9', 'Java', 'Easy', '+', '-', '*', '/', 'Which Java operator is used to concatenate two strings?', '*'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('10', 'Java', 'Easy', 'HashMap', 'ArrayList', 'LinkedList', 'HashSet', 'In Java, which collection class provides an implementation of a dynamic array?', 'ArrayList'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('11', 'Python', 'Easy', 'count()', 'size()', 'length()', 'len()', 'Which Python function is used to calculate the length of a list?', 'Len ()'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('12', 'Python', 'Easy', '[1,2,3]', '[1,2,3,4]', '[4,3,2,11]', 'Error', 'What is the output of the following Python code snippet?', '[1,2,3,4]'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('13', 'Python', 'Easy', 'break', 'continue', 'pass', 'return', 'Which Python statement is used to exit from a loop prematurely?', 'break'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('14', 'Python', 'Easy', 'To generate a random number within a given range.', 'To iterate over a sequence of numbers.', 'To sort a list in ascending order.', 'To calculate the length of a string', 'What is the purpose of the range () function in Python?', 'To iterate over a sequence of numbers.'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('15', 'Python', 'Python', 'int', 'float', '|str', 'List', 'In Python, which data type is mutable?', 'List'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('16', 'Python', 'Python', 'datetime', 'math', 'os', 'sys', 'Which Python module is used for working with dates and times?', 'datetime');
@VijayR-x5k
@VijayR-x5k 2 ай бұрын
can anyone tell how to create quizdb??please help me
@VijayR-x5k
@VijayR-x5k 2 ай бұрын
how to create quizdb?pleasse any one help me
@chintha1221
@chintha1221 Жыл бұрын
Super. Covered all the theories in one go. Thanks a lot sir😊
@shahbazshamshad6693
@shahbazshamshad6693 7 ай бұрын
which IDE is used here? Intellij?
@Vedha-i1p
@Vedha-i1p 3 ай бұрын
Can anybody help me pls, I'm not able to open the zip file in Intellij Idea 🥺🥺
@candidanoronha1804
@candidanoronha1804 Жыл бұрын
Does the Quiz table automatically get created?
@perrythepalteypus2185
@perrythepalteypus2185 21 күн бұрын
Pretty Good tutorial 👍🏻👍🏻👍🏻
@yuvrajbrother3017
@yuvrajbrother3017 Жыл бұрын
Thank you sir
@KisinjaElvis
@KisinjaElvis Жыл бұрын
encountering 405 method not allowed while sending the request for the quiz controller to create a quiz....please help Telusko
@kafychannel
@kafychannel Жыл бұрын
Maybe you send the request as GET when you should do it as POST method
@thaiphongk16_hl56
@thaiphongk16_hl56 10 ай бұрын
If I use @Controller instead of RestController to make a Web page. So how can I send data from the Controller to display in jsp?
@karthikemani5689
@karthikemani5689 11 ай бұрын
Great job , please add a api which has hashmap return type
@LAKSHMANVELKURU
@LAKSHMANVELKURU 2 ай бұрын
Create a controller to group the employees by contract type and get the number of employees in each group,👈can u please explain this
@ramantripathi6980
@ramantripathi6980 10 күн бұрын
SIR YOU ARE AMAZING
@SaritaAdhikari-h3p
@SaritaAdhikari-h3p Жыл бұрын
Quiz_questions table is empty. How do we solve this problem?
@harshitgupta1034
@harshitgupta1034 7 ай бұрын
same issue
@avinashchoudhary9085
@avinashchoudhary9085 7 ай бұрын
Any solution ?
@huzaifanaseer1484
@huzaifanaseer1484 4 күн бұрын
Great
@manjunathbhandari108
@manjunathbhandari108 7 ай бұрын
Anybody knows IntellijIdea plugin to format the SQL query
@gauravhajare8305
@gauravhajare8305 2 ай бұрын
anybody have code file?
@Unknown373d
@Unknown373d 4 ай бұрын
It's spring frame not spring boot, right
@11divyanggaur74
@11divyanggaur74 3 ай бұрын
Wrong
@SubhankarMondal1205
@SubhankarMondal1205 2 ай бұрын
No man this is nodejs not express js
@programmer1729
@programmer1729 19 күн бұрын
It is spring boot, I think in spring we can't use annotations. Is that correct?
@SubhankarMondal1205
@SubhankarMondal1205 9 күн бұрын
@@programmer1729 we can.
@SubhankarMondal1205
@SubhankarMondal1205 9 күн бұрын
@@programmer1729 difference between spring and springboot is basically it provides starter template and auto configuration
@sagar-gavhane
@sagar-gavhane Жыл бұрын
I really enjoyed project 👍
@rushikeshdhane7430
@rushikeshdhane7430 5 ай бұрын
hello sagar how u made postgre connection with project . have u done with that ?
@SurajPatil-yt8zc
@SurajPatil-yt8zc 7 ай бұрын
Can someone share the database file for this project for MYSQL
@rahuljmd
@rahuljmd 3 ай бұрын
Thanks for this project, really loved it...Need more such videos of Spring Boot projcets which are more advanced and which has spring security, aop and other concepts covered.
@angadsingh6701
@angadsingh6701 7 ай бұрын
How do we print any variable or an array to see how the data is or in what format it is. Bcuz here the iteration worked as both response and questions are in same order. But we might have to map the response wih the question... So how do we print some data in springboot? Tried doing in service layer but didnt work!!
@jayndratodawat4627
@jayndratodawat4627 8 ай бұрын
we can use MappingJacksonValue and SimpleBeanPropertyFilter for dynamic filter to Question class for specific api rather than creating new QuizWrapper class
@kiyoqsy4901
@kiyoqsy4901 4 күн бұрын
50:41
@kaviarasi8930
@kaviarasi8930 3 ай бұрын
Hi , i need some help code base , how to communicate with you
@thearpitkatiyar637
@thearpitkatiyar637 Жыл бұрын
Please give Database file
@PrabinManShrestha
@PrabinManShrestha Жыл бұрын
For MYSQL database : create database if not exists questiondb; use questiondb; CREATE TABLE question ( id SERIAL PRIMARY KEY, category VARCHAR(255), difficultylevel VARCHAR(255), option1 VARCHAR(255), option2 VARCHAR(255), option3 VARCHAR(255), option4 VARCHAR(255), question_title VARCHAR(255), right_answer VARCHAR(255) ); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('1', 'JAVA', 'Easy', 'class', 'interface', 'extends', 'implements', 'Which Java keyword is used to create a subclass?', 'extends'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('2', 'Java', 'Easy', '4', '5', '6', 'Compile error', 'What is the output of the following Java code snippet?', '5'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('3', 'Java', 'Easy', 'TRUE', 'TRUE', '0', 'null', 'In Java, what is the default value of an uninitialized boolean variable?', 'FALSE'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('4', 'Java', 'Easy', 'throw', 'try', 'catch', 'finally', 'Which Java keyword is used to explicitly throw an exception?', 'throw'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('5', 'Java', 'Easy', 'It indicates that a variable is constant.', 'It indicates that a variable is constant.', 'It indicates that a class cannot be extended.', 'It indicates that a variable is of primitive type.', 'What does the static keyword mean in Java?', 'It indicates that a method can be accessed without creating an instance of'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('6', 'Java', 'Easy', 'constant int x = 5;', 'final int x = 5;', 'static int x = 5;', 'readonly int x = 5.', 'What is the correct way to declare a constant variable in Java?', 'final int x = 5;'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('7', 'Java', 'Easy', 'for loop', 'while loop', 'do-while loop', 'switch loop', 'Which loop in Java allows the code to be executed at least once?', 'do-while loop'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('8', 'Java', 'Easy', 'To terminate a loop or switch statement and transfer control to the next stateme....', 'To skip the rest of the code in a loop and move to the next iteration.', 'To define a label for a loop or switch statement', 'To check a condition and execute a block of code repeated', 'What is the purpose of the \'break\' statement in Java?', 'To terminate a loop or switch statement and transfer control to the next statement'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('9', 'Java', 'Easy', '+', '-', '*', '/', 'Which Java operator is used to concatenate two strings?', '*'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('10', 'Java', 'Easy', 'HashMap', 'ArrayList', 'LinkedList', 'HashSet', 'In Java, which collection class provides an implementation of a dynamic array?', 'ArrayList'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('11', 'Python', 'Easy', 'count()', 'size()', 'length()', 'len()', 'Which Python function is used to calculate the length of a list?', 'Len ()'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('12', 'Python', 'Easy', '[1,2,3]', '[1,2,3,4]', '[4,3,2,11]', 'Error', 'What is the output of the following Python code snippet?', '[1,2,3,4]'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('13', 'Python', 'Easy', 'break', 'continue', 'pass', 'return', 'Which Python statement is used to exit from a loop prematurely?', 'break'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('14', 'Python', 'Easy', 'To generate a random number within a given range.', 'To iterate over a sequence of numbers.', 'To sort a list in ascending order.', 'To calculate the length of a string', 'What is the purpose of the range () function in Python?', 'To iterate over a sequence of numbers.'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('15', 'Python', 'Python', 'int', 'float', '|str', 'List', 'In Python, which data type is mutable?', 'List'); INSERT INTO `questiondb`.`question` (`id`, `category`, `difficultylevel`, `option1`, `option2`, `option3`, `option4`, `question_title`, `right_answer`) VALUES ('16', 'Python', 'Python', 'datetime', 'math', 'os', 'sys', 'Which Python module is used for working with dates and times?', 'datetime');
@LeetcodeToday
@LeetcodeToday 2 ай бұрын
How to learn Frontend Part for this and to make it ?
@nandugopalun1
@nandugopalun1 Жыл бұрын
How easy to convert spring to spring boot? Is it possible to call spring functions from spring boot REST API?
@kartiktripathi9963
@kartiktripathi9963 9 ай бұрын
How to create DeleteMapping, i am getting exception "foreign key constraint"
@ojaskumar2355
@ojaskumar2355 2 ай бұрын
Just for Tip : sql user set id = 0 as default value it will not give u error
@nithubrijita8341
@nithubrijita8341 Жыл бұрын
Hi , does any one know how to translate the values in jira payload from user's locale to english ?( Not in the UI)
@swethasenthilkumar6372
@swethasenthilkumar6372 Жыл бұрын
Sir I have one doubt in java collections api why we use Wrapper classes in key instead of primitive data types in hashmap? can you explain me
@yavaralikhan9142
@yavaralikhan9142 Жыл бұрын
because collection api doesn't support primitive types , that's where wrapper class comes into picture
@PulkitArora-f4p
@PulkitArora-f4p 7 ай бұрын
Database setup script using pg Admin 4 ??
@RaviSingh-ij1yk
@RaviSingh-ij1yk 10 ай бұрын
From where we can access the database that you are using . Can anybody help me with that
@ahmetkucukgokce3424
@ahmetkucukgokce3424 Жыл бұрын
I have an issue on the primary key on the table when i add elements. When i restart the spring boot, the number for the id increments by 50. Are there any solutions for that?
@yaswanthbhanu8565
@yaswanthbhanu8565 10 ай бұрын
Can anyone pls tell the payload which is passed for create quiz api?
@berkalbas2513
@berkalbas2513 9 ай бұрын
I got error when sent post request. { "timestamp": "2023-12-28T19:06:49.031+00:00", "status": 500, "error": "Internal Server Error", "path": "/question/add" } How can I solve ? min: 57.27
@firecloudgaming5941
@firecloudgaming5941 8 ай бұрын
check the table attributes in the DB column name should match the variable name in the entity class for the respective table
@PulkitArora-f4p
@PulkitArora-f4p 7 ай бұрын
not showing the data after following all steps
@아두-s3n
@아두-s3n 3 ай бұрын
Hey where can i get db dump?
@MaheshVerma-p7r
@MaheshVerma-p7r Жыл бұрын
how to create the table in postgre provide something
@arjunreddy9558
@arjunreddy9558 Жыл бұрын
Hlo I am not Getting the data in 28 th minute,can u please explain?
@honeysungra2749
@honeysungra2749 Жыл бұрын
I am also not getting the data
@honeysungra2749
@honeysungra2749 Жыл бұрын
I got the solution - It may be because of lombok, so create getter and setter, constructor using flelds , constructor from superclass and toString
@drizle9231
@drizle9231 11 ай бұрын
Thanks!!! worked@@honeysungra2749
@virinchinudurumati2073
@virinchinudurumati2073 9 ай бұрын
When I'm trying to create "QUIZ" using Spring Boot I'm getting this error. "Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Could not determine recommended JdbcType for Java type 'com.project.model.Question' " The SQL query is not executing "SELECT *FROM question q WHERE q.category=:category ORDER BY RANDOM() LIMIT:numQ;" Could anyone please help me sort this?
@TuanLe-bp9gd
@TuanLe-bp9gd 7 ай бұрын
Which database do you use?
@srinivasdokare4274
@srinivasdokare4274 27 күн бұрын
​@@TuanLe-bp9gd I'm using mySQL and while I'm trying to run the nativeQuery I'm getting some error. Any idea why? is it because I'm using mySQL as database which doesn't support parameter binding in LIMIT. please reply
@forexchange5403
@forexchange5403 Жыл бұрын
How to work with the same example by using hibernate instead of jpa
@Harsh-fd4ml
@Harsh-fd4ml 8 ай бұрын
please make video on spring oauth and form login and log out
@iamdivyaprakash
@iamdivyaprakash Жыл бұрын
Really very nice and helpful sir
@mugenzideodate5733
@mugenzideodate5733 Жыл бұрын
How spring boot to call multiple data tables from DB?
@rushikeshdhane7430
@rushikeshdhane7430 5 ай бұрын
hello Reddy Sir. plz describe how you configure postgre into spring project .kindly provide tutorial or describe in short. i have mention this project in resume and i got call for interview . before that i want to finish this project.kindly help me sir
@PushpendraSingh-co9uq
@PushpendraSingh-co9uq 4 ай бұрын
Did you cleared your interview?
@rtadwq...------...----.
@rtadwq...------...----. Жыл бұрын
It's this video beginners friendly?
@bekaiarajuli9601
@bekaiarajuli9601 Жыл бұрын
Question wrapper maybe record
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 12 МЛН
The joker favorite#joker  #shorts
00:15
Untitled Joker
Рет қаралды 30 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 8 МЛН
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 12 МЛН