Spring Boot Project for Beginners

  Рет қаралды 403,967

Telusko

Telusko

Күн бұрын

Пікірлер: 342
@mitodea
@mitodea Жыл бұрын
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 Жыл бұрын
Thanks Man ✌✌
@modhugumudiushasri2330
@modhugumudiushasri2330 Жыл бұрын
Thanks a lot
@virajsandakelum7900
@virajsandakelum7900 Жыл бұрын
Thankz
@kapkarakartal55
@kapkarakartal55 11 ай бұрын
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 11 ай бұрын
Thank Man
@aldrindelossantos7995
@aldrindelossantos7995 6 ай бұрын
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 6 ай бұрын
Bro can u guide me
@sauravgheewala8373
@sauravgheewala8373 11 ай бұрын
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 9 ай бұрын
still not working
@sauravgheewala8373
@sauravgheewala8373 9 ай бұрын
@@harshitgupta1034 what query you wrote ?
@shanesanal4616
@shanesanal4616 6 ай бұрын
@@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 4 ай бұрын
@@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 2 ай бұрын
Damn I was breaking my head since last 2 days for this..after using Rand() the code is working fine now.
@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
@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
@nikitajagtap9803
@nikitajagtap9803 11 ай бұрын
Wow! Very well explained and covered all the topics with clarity!
@subhambhattacharyya8802
@subhambhattacharyya8802 11 күн бұрын
Than you very much Navin sir for this wonderful beginner's project. I hope you'll create more such projects in the future for the sole purpose of learning.
@chintha1221
@chintha1221 Жыл бұрын
Super. Covered all the theories in one go. Thanks a lot sir😊
@shahbazshamshad6693
@shahbazshamshad6693 9 ай бұрын
which IDE is used here? Intellij?
@unknownbiri
@unknownbiri 11 ай бұрын
Amazing video. Thank you so much! This video really made me confident in the beginning of learning back end dev with Java.
@someshsahu4638
@someshsahu4638 Жыл бұрын
Very nice and deep explanation i learnt a lot from this video thank you so much sir 🙏🏼🙏🏼🙏🏼
@nachiketnijap6990
@nachiketnijap6990 11 ай бұрын
You are master of your art respect ++
@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 😘😘🥰
@nostalgiacademy7378
@nostalgiacademy7378 Жыл бұрын
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 Жыл бұрын
check ur application properties once and name of the column in db
@pendyalakedhareeswar9753
@pendyalakedhareeswar9753 Жыл бұрын
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
@ojaskumar2355
@ojaskumar2355 4 ай бұрын
Just for Tip : sql user set id = 0 as default value it will not give u error
@rahuljmd
@rahuljmd 5 ай бұрын
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.
@eashan2405
@eashan2405 10 ай бұрын
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 8 ай бұрын
Thanks alot.
@sandeepguin4815
@sandeepguin4815 Ай бұрын
Thanks
@jayndratodawat4627
@jayndratodawat4627 11 ай бұрын
we can use MappingJacksonValue and SimpleBeanPropertyFilter for dynamic filter to Question class for specific api rather than creating new QuizWrapper class
@nareshrathnam
@nareshrathnam 10 ай бұрын
I want that sql table.. can you upload that also in git, Naveen?
@bhavyanayak8219
@bhavyanayak8219 Ай бұрын
Extremely useful video. Glad I ended up on this video. Subscribed!
@rahulharijan243
@rahulharijan243 11 ай бұрын
great tutorial..it helped a lot..Thanks🙏🙏 I don't know why, @Data from lombok was not working, when i used it, Empty ArrayList was coming in response...So I made getters and setters and completed the project
@Hhyxzz
@Hhyxzz 9 ай бұрын
Thanks a lot, same issue i faced it and got a result as you suggested
@Hhyxzz
@Hhyxzz 9 ай бұрын
If you are using STS, you have to first download lombak jar file in maven repository in your local system then you can use it
@alvinodinukwe8431
@alvinodinukwe8431 6 ай бұрын
​ @jayasrikirubanandam8693 change case of category string in postman from "Java" to "java": .../quiz/create?category=java&numQ=5&title=JQuiz
@SanthoshKumar-jv8kt
@SanthoshKumar-jv8kt 8 ай бұрын
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 ?
@allenvarughese1433
@allenvarughese1433 11 ай бұрын
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.?
@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 );
@karthikemani5689
@karthikemani5689 Жыл бұрын
Great job , please add a api which has hashmap return type
@SahilKhan-iu8oq
@SahilKhan-iu8oq Жыл бұрын
from where to copy your sql code? please provide somewhere so that we could save some of the time
@markogavrilovic2583
@markogavrilovic2583 Жыл бұрын
More Spring Boot projects please!
@aakarshsrivastava2546
@aakarshsrivastava2546 Жыл бұрын
Sir from where we will get the database . Please provide any link to access the database of the quiz app
@berkalbas2513
@berkalbas2513 11 ай бұрын
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 10 ай бұрын
check the table attributes in the DB column name should match the variable name in the entity class for the respective table
@ramakrishnach6101
@ramakrishnach6101 Ай бұрын
Hi please let me know how to resolve the spring boot and JDK version compatibility (mismatch) how to fix the problem
@muraleedharanp1970
@muraleedharanp1970 4 ай бұрын
Easy to understand, you are awesome sir
@jayanthv5867
@jayanthv5867 Жыл бұрын
I believe we can directly pass Question object into QuestionWrapper constructor instead of sending multiple parameters.
@abishasherlin5896
@abishasherlin5896 Жыл бұрын
I think we can't, bcz we don't need all variables from Question class..the reason is user should get the question without right ans, diff level..
@jayanthv5867
@jayanthv5867 Жыл бұрын
@@abishasherlin5896 I meant we can pass question object and use only the required attributes of question object inside question wrapper. There is no way we are showing answer using question wrapper. That's the whole point of using wrapper r8!😅
@keshavkumar-pe9kb
@keshavkumar-pe9kb Жыл бұрын
I am facing post method problem --{ "timestamp": "2023-08-21T09:20:10.997+00:00", "status": 415, "error": "Unsupported Media Type", "path": "/question/add" }
@alokbhushan9026
@alokbhushan9026 Жыл бұрын
Are you sending the data in json format from postman?
@keshavkumar-pe9kb
@keshavkumar-pe9kb Жыл бұрын
@@alokbhushan9026 yes
@anubhavgupta4412
@anubhavgupta4412 Жыл бұрын
please let me know from you set up the database
@sagar-gavhane
@sagar-gavhane Жыл бұрын
I really enjoyed project 👍
@rushikeshdhane7430
@rushikeshdhane7430 7 ай бұрын
hello sagar how u made postgre connection with project . have u done with that ?
@anuragprajapati3712
@anuragprajapati3712 5 ай бұрын
Amazing explanation 😉.Thanks for giving such type of video
@altaf.ahmed.youtube
@altaf.ahmed.youtube Ай бұрын
Great Teaching skills.
@Javadeveloper-rn5io
@Javadeveloper-rn5io 10 ай бұрын
so beautiful so elegent just looking like a Jhonny Sins
@ridmadissanayake5201
@ridmadissanayake5201 10 ай бұрын
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');
@jesper2455
@jesper2455 Жыл бұрын
Good video for beginners showing how you set up a basic Spring Boot project.
@aniketgeet1520
@aniketgeet1520 Жыл бұрын
SIR CAN U PLEASE WORK ON PLAYLISTS SO THAT IN PLAYLIST SECTION WE CAN FIND ALL VIDEOS IN ONCE PLACE
@sivasubramaniS05
@sivasubramaniS05 Жыл бұрын
simply awesome 🥰 thank you
@perrythepalteypus2185
@perrythepalteypus2185 2 ай бұрын
Pretty Good tutorial 👍🏻👍🏻👍🏻
@ramantripathi6980
@ramantripathi6980 2 ай бұрын
SIR YOU ARE AMAZING
@mta3555
@mta3555 Жыл бұрын
Awesome, thank you ❤ Just UI maybe with Angular or React, and beginners like me will enjoy. Thank you again
@jayasrikirubanandam8693
@jayasrikirubanandam8693 Жыл бұрын
Hi , GOT STUCK , I am not getting questions in quiz_questions table? Used the same query not able to fetch questions?
@SaritaAdhikari-h3p
@SaritaAdhikari-h3p Жыл бұрын
I am having the same issue.
@SaritaAdhikari-h3p
@SaritaAdhikari-h3p Жыл бұрын
I am also having the same issue.
@alvinodinukwe8431
@alvinodinukwe8431 6 ай бұрын
​@@jayasrikirubanandam8693 change case of category string in postman from "Java" to "java": .../quiz/create?category=java&numQ=5&title=JQuiz
@dineshdr1353
@dineshdr1353 Жыл бұрын
❤❤❤osm explanations
@williammallak2040
@williammallak2040 Жыл бұрын
great tutorial as usual thank you so much
@dakanksha1806
@dakanksha1806 Жыл бұрын
Thank you so much!! Learnt a lot.❤
@laraibkamalasdar6837
@laraibkamalasdar6837 Ай бұрын
Am I the only one whose quiz_questions table is not getting any questions , but the quiz is getting
@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 9 ай бұрын
facing same issue, any solution?
@avinashchoudhary9085
@avinashchoudhary9085 9 ай бұрын
Any solution ?
@pirateluffy7365
@pirateluffy7365 5 ай бұрын
same issue im getting only {} as response. data is not getting fetched. but not getting any errors also.
@akmalamien4958
@akmalamien4958 Жыл бұрын
This is so fun ! thanks bro
@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 8 ай бұрын
same here. How did you manage to solve it?
@karunakaryadav3168
@karunakaryadav3168 7 ай бұрын
help me with this error
@tharunvenkadeshm650
@tharunvenkadeshm650 6 ай бұрын
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.
@Arjun2mkap3929
@Arjun2mkap3929 2 ай бұрын
23:00
@virinchinudurumati2073
@virinchinudurumati2073 11 ай бұрын
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 9 ай бұрын
Which database do you use?
@srinivasdokare4274
@srinivasdokare4274 2 ай бұрын
​@@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
@SachinAG-d2g
@SachinAG-d2g Жыл бұрын
helped in many ways thank you so much ,remembered forever
@Harsh-fd4ml
@Harsh-fd4ml 10 ай бұрын
please make video on spring oauth and form login and log out
@nihilityuser_13
@nihilityuser_13 8 ай бұрын
Hello sir, at 45:07, I tried to change GenerationType to IDENTITY, but I got error "org.springframework.orm.jpa.JpaSystemException: could not execute statement [Field 'id' doesn't have a default value]", anyone know how to fix it? thanks
@nihilityuser_13
@nihilityuser_13 8 ай бұрын
found the solution! id was not defined as AUTO_INCREMENT, just need to fix the SQL code. before: id SERIAL PRIMARY KEY; after: ALTER TABLE question MODIFY id int NOT NULL AUTO_INCREMENT;
@keronz202
@keronz202 11 ай бұрын
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');
@isaacreyes4915
@isaacreyes4915 10 ай бұрын
Hm, would you say the entire "Restful web services in Java" playlist is still relevant even though it is 6 years old?
@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?
@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 Жыл бұрын
//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;
@shobasolligi
@shobasolligi 9 ай бұрын
Can anyone share the csv file(Questions & QUIZ) don't see that in Description
@harithabandara3212
@harithabandara3212 6 ай бұрын
Thank you!!!
@srinivasdokare4274
@srinivasdokare4274 2 ай бұрын
⚠⚠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.
@AkshayKumar-cl8js
@AkshayKumar-cl8js 9 ай бұрын
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 8 ай бұрын
Same issue I am also getting. I remember fixing this long back but now I forgot again :D
@kiyoqsy4901
@kiyoqsy4901 2 ай бұрын
50:41
@forexchange5403
@forexchange5403 Жыл бұрын
How to work with the same example by using hibernate instead of jpa
@Nelipson
@Nelipson Жыл бұрын
Lombok @Data doesn't work on my machine, becouse you need install it and do project maven update.
@suneramunasinghe
@suneramunasinghe 7 ай бұрын
Same, I manually generated getters and setters since using @Data from lombok just ouputted an empty list.
@alonewolf7682
@alonewolf7682 Жыл бұрын
Great video
@dhiyalaksh301
@dhiyalaksh301 Ай бұрын
We have to download the pgAdmin in our system to store data?
@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
@SaritaAdhikari-h3p
@SaritaAdhikari-h3p Жыл бұрын
Quiz_questions table is empty. How do we solve this problem?
@harshitgupta1034
@harshitgupta1034 9 ай бұрын
same issue
@avinashchoudhary9085
@avinashchoudhary9085 9 ай бұрын
Any solution ?
@samikshyasahoo9010
@samikshyasahoo9010 4 ай бұрын
My questions are not appearing it's giving me a null list. What should I do.
@kalairoxan2398
@kalairoxan2398 3 ай бұрын
Same HERE 1:18:08 did fix it ma'am
@osamapathan-u2c
@osamapathan-u2c 2 ай бұрын
dont use lambok. create getter setters toString manually
@candidanoronha1804
@candidanoronha1804 Жыл бұрын
Does the Quiz table automatically get created?
@LAKSHMANVELKURU
@LAKSHMANVELKURU 4 ай бұрын
Create a controller to group the employees by contract type and get the number of employees in each group,👈can u please explain this
@angadsingh6701
@angadsingh6701 9 ай бұрын
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!!
@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
@adityac2931
@adityac2931 Жыл бұрын
Those who are getting "org.postgresql.util.PSQLException: ERROR: relation "quiz" does not exist" at 1:16:25, you need to add spring.jpa.properties.hibernate.hbm2ddl.auto=update in application.properties file
@iamdivyaprakash
@iamdivyaprakash Жыл бұрын
Really very nice and helpful sir
@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');
@LeetcodeToday
@LeetcodeToday 4 ай бұрын
How to learn Frontend Part for this and to make it ?
@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
@YerraBhanuKiran
@YerraBhanuKiran Жыл бұрын
java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' - I am getting this error in Build output at 27:31. Can anyone please help
@Codewithbenki
@Codewithbenki 10 ай бұрын
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) );
@tej181
@tej181 Жыл бұрын
{"timestamp":"2023-12-01T12:23:05.226+00:00","status":500,"error":"Internal Server Error","path":"/quiz/get/1
@deepanshusingh2068
@deepanshusingh2068 Жыл бұрын
Hey can you help me, I am only getting empty brackets at 27:40 on get request.
@RanjithS1303
@RanjithS1303 Жыл бұрын
Same issue...did you get it?
@williammallak2040
@williammallak2040 Жыл бұрын
make sure lombok is working correctly if not just generate getters and setters and toString methods
@aabhasjain96
@aabhasjain96 Жыл бұрын
Hi there, I was also getting same response, after trying multiple solution finally it worked. It's because of lombok, so as mentioned by Sir, it's optional. Instead of using Lombok you can simple create getter and setter methods for all variables in Question,java file and remove that @Data annotaion. It will work.
@alvinodinukwe8431
@alvinodinukwe8431 6 ай бұрын
change case of category string in postman from "Java" to "java": .../quiz/create?category=java&numQ=5&title=JQuiz
@PulkitArora-f4p
@PulkitArora-f4p 9 ай бұрын
Why I have to make getter and setter when setTitle is used as use lambok ??
@bulelaniquinton7272
@bulelaniquinton7272 Жыл бұрын
great vid👍
@thaiphongk16_hl56
@thaiphongk16_hl56 Жыл бұрын
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?
@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
@nandugopalun1
@nandugopalun1 Жыл бұрын
How easy to convert spring to spring boot? Is it possible to call spring functions from spring boot REST API?
@rushikeshdhane7430
@rushikeshdhane7430 7 ай бұрын
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 6 ай бұрын
Did you cleared your interview?
@alfiyamn4119
@alfiyamn4119 Жыл бұрын
how to add the path in requestmapping? like @Requestmapping(path) I am completely new to spring boot.
@kartiktripathi9963
@kartiktripathi9963 11 ай бұрын
How to create DeleteMapping, i am getting exception "foreign key constraint"
@christhelemaque4187
@christhelemaque4187 Жыл бұрын
Whats the difference between @RestController vs @Controller
@maleeshasandakalum6213
@maleeshasandakalum6213 Жыл бұрын
Thank you
@huzaifanaseer1484
@huzaifanaseer1484 2 ай бұрын
Great
@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)
@mugenzideodate5733
@mugenzideodate5733 Жыл бұрын
How spring boot to call multiple data tables from DB?
#5 What is Spring Boot?
12:12
Telusko
Рет қаралды 109 М.
Spring Boot Tutorials | Full Course
2:48:08
Telusko
Рет қаралды 3,2 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 37 МЛН
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 6 МЛН
One day.. 🙌
00:33
Celine Dept
Рет қаралды 65 МЛН
Building web applications in Java with Spring Boot 3 - Tutorial
3:30:40
freeCodeCamp.org
Рет қаралды 671 М.
Harsh Truth of Java in 2024! Ft. Ultimate Java Developer @Telusko
28:46
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 98 МЛН
Spring Framework and Spring Boot Tutorial with Project
5:25:26
Telusko
Рет қаралды 221 М.
Java Spring Boot Mongodb Full Project
1:15:35
Telusko
Рет қаралды 191 М.
Microservices using SpringBoot 3.0 | Full Example [NEW]
1:25:38
Daily Code Buffer
Рет қаралды 199 М.
НЕ ПОКУПАЙ iPhone 17 Air!
0:40
ÉЖИ АКСЁНОВ
Рет қаралды 3,1 МЛН
Nokia....
0:16
NEXIDO EDITS
Рет қаралды 9 МЛН
купила SAMSUNG Z FLIP 6 🎀 и вот что получилось
0:47