Spring Boot Project for Beginners

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 314

  • @pranchalgupta2370
    @pranchalgupta2370 Před 11 měsíci +121

    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 Před 10 měsíci

      Thanks Man ✌✌

    • @modhugumudiushasri2330
      @modhugumudiushasri2330 Před 9 měsíci

      Thanks a lot

    • @virajsandakelum7900
      @virajsandakelum7900 Před 9 měsíci

      Thankz

    • @kapkarakartal55
      @kapkarakartal55 Před 8 měsíci +14

      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 Před 8 měsíci

      Thank Man

  • @mitodea
    @mitodea Před 10 měsíci +45

    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

  • @aldrindelossantos7995
    @aldrindelossantos7995 Před 3 měsíci +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.

  • @goddy510
    @goddy510 Před rokem +21

    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 Před rokem +1

      which boot camp are you joining , can u please share ?

    • @kafychannel
      @kafychannel Před rokem +1

      Is it Vlad Mishustin's bootcamp? :))

    • @deepakt4737
      @deepakt4737 Před rokem

      @@kafychannel where can i get the links for it

  • @sauravgheewala8373
    @sauravgheewala8373 Před 8 měsíci +7

    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 Před 6 měsíci +1

      still not working

    • @sauravgheewala8373
      @sauravgheewala8373 Před 6 měsíci

      @@harshitgupta1034 what query you wrote ?

    • @shanesanal4616
      @shanesanal4616 Před 3 měsíci

      @@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 Před měsícem

      @@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 Před dnem

      Damn I was breaking my head since last 2 days for this..after using Rand() the code is working fine now.

  • @mohsenshamohammadi
    @mohsenshamohammadi Před rokem +9

    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 Před 11 měsíci +1

      yeah , i got the same issue , why its happening

  • @raviprakashreddy8128
    @raviprakashreddy8128 Před rokem +15

    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

  • @ojaskumar2355
    @ojaskumar2355 Před měsícem

    Just for Tip : sql user set id = 0 as default value it will not give u error

  • @nikitajagtap9803
    @nikitajagtap9803 Před 8 měsíci +5

    Wow! Very well explained and covered all the topics with clarity!

  • @RKARAN-zs5zn
    @RKARAN-zs5zn Před rokem +29

    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 Před rokem +2

      Thanks 🙏🏿

    • @ArjunU931
      @ArjunU931 Před 11 měsíci +1

      thanksssss

    • @siddharthkhandelwal933
      @siddharthkhandelwal933 Před 11 měsíci +1

      Thank You So Much

    • @aman_
      @aman_ Před 11 měsíci +1

      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 Před 11 měsíci

      @@aman_ Thanks for the help 😘😘🥰

  • @someshsahu4638
    @someshsahu4638 Před rokem +5

    Very nice and deep explanation i learnt a lot from this video thank you so much sir 🙏🏼🙏🏼🙏🏼

  • @eashan2405
    @eashan2405 Před 7 měsíci +2

    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"

  • @unknownbiri
    @unknownbiri Před 8 měsíci +2

    Amazing video. Thank you so much! This video really made me confident in the beginning of learning back end dev with Java.

  • @chintha1221
    @chintha1221 Před 11 měsíci +3

    Super. Covered all the theories in one go.
    Thanks a lot sir😊

  • @rahuljmd
    @rahuljmd Před 2 měsíci

    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.

  • @SanthoshKumar-jv8kt
    @SanthoshKumar-jv8kt Před 5 měsíci +1

    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 ?

  • @SahilKhan-iu8oq
    @SahilKhan-iu8oq Před 11 měsíci +3

    from where to copy your sql code? please provide somewhere so that we could save some of the time

  • @nachiketnijap6990
    @nachiketnijap6990 Před 8 měsíci +2

    You are master of your art
    respect ++

  • @nostalgiacademy7378
    @nostalgiacademy7378 Před 10 měsíci +3

    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 Před 9 měsíci

      check ur application properties once and name of the column in db

    • @pendyalakedhareeswar9753
      @pendyalakedhareeswar9753 Před 9 měsíci

      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

  • @challasaibhanuteja5314
    @challasaibhanuteja5314 Před rokem +4

    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
    );

  • @jayndratodawat4627
    @jayndratodawat4627 Před 8 měsíci

    we can use MappingJacksonValue and SimpleBeanPropertyFilter for dynamic filter to Question class for specific api rather than creating new QuizWrapper class

  • @nareshrathnam
    @nareshrathnam Před 7 měsíci +2

    I want that sql table.. can you upload that also in git, Naveen?

  • @aakarshsrivastava2546
    @aakarshsrivastava2546 Před rokem +3

    Sir from where we will get the database . Please provide any link to access the database of the quiz app

  • @srinivasdokare4274
    @srinivasdokare4274 Před 2 dny

    ⚠⚠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.

  • @muraleedharanp1970
    @muraleedharanp1970 Před měsícem

    Easy to understand, you are awesome sir

  • @anuragprajapati3712
    @anuragprajapati3712 Před 2 měsíci

    Amazing explanation 😉.Thanks for giving such type of video

  • @samikshyasahoo9010
    @samikshyasahoo9010 Před měsícem +1

    My questions are not appearing it's giving me a null list. What should I do.

  • @virinchinudurumati2073
    @virinchinudurumati2073 Před 9 měsíci +1

    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 Před 6 měsíci

      Which database do you use?

    • @srinivasdokare4274
      @srinivasdokare4274 Před 2 dny

      ​@@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

  • @AkshayKumar-cl8js
    @AkshayKumar-cl8js Před 6 měsíci +1

    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 Před 5 měsíci

      Same issue I am also getting. I remember fixing this long back but now I forgot again :D

  • @sreelatha5274
    @sreelatha5274 Před rokem +1

    For post method with category in question controller used pathvariable but in quiz controller used requestparam is there any specific reson behind this?

  • @allenvarughese1433
    @allenvarughese1433 Před 8 měsíci

    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.?

  • @shobasolligi
    @shobasolligi Před 6 měsíci +1

    Can anyone share the csv file(Questions & QUIZ) don't see that in Description

  • @jayasrikirubanandam8693
    @jayasrikirubanandam8693 Před rokem +4

    Do anyone facing this issue? Not able to use setter methods like setTitle , setQuestions while creating a quiz table despite of having lombok dependencies

  • @karthikemani5689
    @karthikemani5689 Před 10 měsíci +1

    Great job , please add a api which has hashmap return type

  • @ridmadissanayake5201
    @ridmadissanayake5201 Před 7 měsíci +1

    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');

  • @angadsingh6701
    @angadsingh6701 Před 6 měsíci

    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!!

  • @subhashreddy4624
    @subhashreddy4624 Před rokem +1

    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 Před 10 měsíci

      //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;

  • @keronz202
    @keronz202 Před 8 měsíci +1

    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');

  • @jayasrikirubanandam8693
    @jayasrikirubanandam8693 Před rokem +2

    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?

  • @user-oq6us8iu4z
    @user-oq6us8iu4z Před měsícem

    Create a controller to group the employees by contract type and get the number of employees in each group,👈can u please explain this

  • @manikantakattunga6104
    @manikantakattunga6104 Před 11 měsíci

    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

  • @LeetcodeToday
    @LeetcodeToday Před měsícem

    How to learn Frontend Part for this and to make it ?

  • @ahmetkucukgokce3424
    @ahmetkucukgokce3424 Před rokem

    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?

  • @jesper2455
    @jesper2455 Před rokem +1

    Good video for beginners showing how you set up a basic Spring Boot project.

  • @sagar-gavhane
    @sagar-gavhane Před rokem +3

    I really enjoyed project 👍

    • @rushikeshdhane7430
      @rushikeshdhane7430 Před 4 měsíci

      hello sagar how u made postgre connection with project . have u done with that ?

  • @mta3555
    @mta3555 Před rokem +1

    Awesome, thank you ❤
    Just UI maybe with Angular or React, and beginners like me will enjoy. Thank you again

    • @jayasrikirubanandam8693
      @jayasrikirubanandam8693 Před rokem +1

      Hi , GOT STUCK , I am not getting questions in quiz_questions table? Used the same query not able to fetch questions?

    • @user-qb2rx2if5f
      @user-qb2rx2if5f Před rokem +1

      I am having the same issue.

    • @user-qb2rx2if5f
      @user-qb2rx2if5f Před rokem +1

      I am also having the same issue.

    • @alvinodinukwe8431
      @alvinodinukwe8431 Před 3 měsíci

      ​@@jayasrikirubanandam8693 change case of category string in postman from "Java" to "java": .../quiz/create?category=java&numQ=5&title=JQuiz

  • @rahulharijan243
    @rahulharijan243 Před 8 měsíci

    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 Před 6 měsíci +2

      Thanks a lot, same issue i faced it and got a result as you suggested

    • @Hhyxzz
      @Hhyxzz Před 6 měsíci

      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 Před 3 měsíci

      ​ @jayasrikirubanandam8693 change case of category string in postman from "Java" to "java": .../quiz/create?category=java&numQ=5&title=JQuiz

  • @thaiphongk16_hl56
    @thaiphongk16_hl56 Před 9 měsíci

    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?

  • @markogavrilovic2583
    @markogavrilovic2583 Před rokem +1

    More Spring Boot projects please!

  • @Nelipson
    @Nelipson Před 11 měsíci +1

    Lombok @Data doesn't work on my machine, becouse you need install it and do project maven update.

    • @suneramunasinghe
      @suneramunasinghe Před 4 měsíci

      Same, I manually generated getters and setters since using @Data from lombok just ouputted an empty list.

  • @user-br8yx7mm5c
    @user-br8yx7mm5c Před 6 měsíci

    Why I have to make getter and setter when setTitle is used as use lambok ??

  • @Javadeveloper-rn5io
    @Javadeveloper-rn5io Před 8 měsíci

    so beautiful so elegent just looking like a Jhonny Sins

  • @aniketgeet1520
    @aniketgeet1520 Před rokem

    SIR CAN U PLEASE WORK ON PLAYLISTS SO THAT IN PLAYLIST SECTION WE CAN FIND ALL VIDEOS IN ONCE PLACE

  • @user-qw7gd4dx5y
    @user-qw7gd4dx5y Před 2 měsíci

    Can anybody help me pls, I'm not able to open the zip file in Intellij Idea 🥺🥺

  • @kartiktripathi9963
    @kartiktripathi9963 Před 8 měsíci

    How to create DeleteMapping, i am getting exception "foreign key constraint"

  • @tharunvenkadeshm650
    @tharunvenkadeshm650 Před 3 měsíci

    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.

  • @KisinjaElvis
    @KisinjaElvis Před rokem +1

    encountering 405 method not allowed while sending the request for the quiz controller to create a quiz....please help Telusko

    • @kafychannel
      @kafychannel Před rokem

      Maybe you send the request as GET when you should do it as POST method

  • @isaacreyes4915
    @isaacreyes4915 Před 7 měsíci

    Hm, would you say the entire "Restful web services in Java" playlist is still relevant even though it is 6 years old?

  • @VijayR-x5k
    @VijayR-x5k Před měsícem

    can anyone tell how to create quizdb??please help me

  • @user-kw5oh6wg8l
    @user-kw5oh6wg8l Před rokem

    helped in many ways thank you so much ,remembered forever

  • @forexchange5403
    @forexchange5403 Před rokem

    How to work with the same example by using hibernate instead of jpa

  • @dakanksha1806
    @dakanksha1806 Před rokem

    Thank you so much!! Learnt a lot.❤

  • @rushikeshdhane7430
    @rushikeshdhane7430 Před 4 měsíci

    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

  • @alfiyamn4119
    @alfiyamn4119 Před rokem

    how to add the path in requestmapping? like @Requestmapping(path)
    I am completely new to spring boot.

  • @RaviSingh-ij1yk
    @RaviSingh-ij1yk Před 9 měsíci

    From where we can access the database that you are using . Can anybody help me with that

  • @VijayR-x5k
    @VijayR-x5k Před měsícem

    how to create quizdb?pleasse any one help me

  • @nandugopalun1
    @nandugopalun1 Před 11 měsíci

    How easy to convert spring to spring boot? Is it possible to call spring functions from spring boot REST API?

  • @jayanthv5867
    @jayanthv5867 Před rokem

    I believe we can directly pass Question object into QuestionWrapper constructor instead of sending multiple parameters.

    • @abishasherlin5896
      @abishasherlin5896 Před rokem

      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 Před rokem

      @@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!😅

  • @kaviarasi8930
    @kaviarasi8930 Před 2 měsíci

    Hi , i need some help code base , how to communicate with you

  • @user-qb2rx2if5f
    @user-qb2rx2if5f Před rokem +2

    Quiz_questions table is empty. How do we solve this problem?

  • @berkalbas2513
    @berkalbas2513 Před 8 měsíci

    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 Před 7 měsíci

      check the table attributes in the DB
      column name should match the variable name in the entity class for the respective table

  • @williammallak2040
    @williammallak2040 Před rokem

    great tutorial as usual thank you so much

  • @sivasubramaniS05
    @sivasubramaniS05 Před rokem

    simply awesome 🥰 thank you

  • @nithubrijita8341
    @nithubrijita8341 Před rokem

    Hi , does any one know how to translate the values in jira payload from user's locale to english ?( Not in the UI)

  • @motivationalart506
    @motivationalart506 Před rokem +1

    can you provide the data you are using so that we can use the same data?

    • @PrabinManShrestha
      @PrabinManShrestha Před 11 měsíci

      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');

  • @yaswanthbhanu8565
    @yaswanthbhanu8565 Před 9 měsíci

    Can anyone pls tell the payload which is passed for create quiz api?

  • @mugenzideodate5733
    @mugenzideodate5733 Před rokem

    How spring boot to call multiple data tables from DB?

  • @Harsh-fd4ml
    @Harsh-fd4ml Před 7 měsíci

    please make video on spring oauth and form login and log out

  • @chayankumar_cj
    @chayankumar_cj Před 6 měsíci

    java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "com.sonchayan.Question_demo.model.Response.getResponse()" is null
    i got this error please help me to solve this

  • @swethasenthilkumar6372
    @swethasenthilkumar6372 Před rokem +1

    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 Před rokem +2

      because collection api doesn't support primitive types , that's where wrapper class comes into picture

  • @keshavkumar-pe9kb
    @keshavkumar-pe9kb Před rokem

    I am facing post method problem --{
    "timestamp": "2023-08-21T09:20:10.997+00:00",
    "status": 415,
    "error": "Unsupported Media Type",
    "path": "/question/add"
    }

  • @thanhninh8677
    @thanhninh8677 Před 10 měsíci

    when i make function add , it show this
    org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "question1" violates not-null constraint.

  • @candidanoronha1804
    @candidanoronha1804 Před rokem +1

    Does the Quiz table automatically get created?

  • @IamKanuKingsley
    @IamKanuKingsley Před rokem

    Thank you so much for this beautiful tutorial. Please, I got this error: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "com.kay.quizapp.entity.Response.getResponse()" is null. What could I have done wrongly? Regards

    • @IamKanuKingsley
      @IamKanuKingsley Před rokem +3

      I have fixed it. I was sending "reponse" in PostMan instead of " response'. Thanks a lot for your guides. Have a great week.

  • @christhelemaque4187
    @christhelemaque4187 Před rokem

    Whats the difference between @RestController vs @Controller

  • @Codewithbenki
    @Codewithbenki Před 7 měsíci

    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)
    );

  • @user-wh7yt1ez6w
    @user-wh7yt1ez6w Před rokem

    how to create the table in postgre provide something

  • @manjunathbhandari108
    @manjunathbhandari108 Před 6 měsíci

    Anybody knows IntellijIdea plugin to format the SQL query

  • @dineshdr1353
    @dineshdr1353 Před rokem +3

    ❤❤❤osm explanations

  • @radheravi-vp5kp
    @radheravi-vp5kp Před 11 měsíci

    sir for delete if we use delete , then we have to provide whole question class, which is lengthy , instead we use deleteById , but for this we need to know id of particular Question
    how to resolve this issue ?

    • @SpriTeGaimngHD
      @SpriTeGaimngHD Před 11 měsíci +2

      And whats the problem with that? If you want to delete a question from your database you will need to know the id of it.
      for ex:
      @DeleteMapping("/remove/{id}")
      public ResponseEntity removeQuestion(@PathVariable Integer id) {
      return questionService.removeQuestion(id);
      }

    • @user-qm4oc8nb8e
      @user-qm4oc8nb8e Před měsícem

      @@SpriTeGaimngHD thanks bro. But i have tried it without writing ResponseEntity instead just simple String and it worked fine

  • @user-np7hk4nx1f
    @user-np7hk4nx1f Před 7 měsíci

    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.

  • @arjunreddy9558
    @arjunreddy9558 Před rokem +1

    Hlo I am not Getting the data in 28 th minute,can u please explain?

    • @honeysungra2749
      @honeysungra2749 Před rokem

      I am also not getting the data

    • @honeysungra2749
      @honeysungra2749 Před rokem +2

      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 Před 10 měsíci

      Thanks!!! worked@@honeysungra2749

  • @shivamjha3663
    @shivamjha3663 Před 2 měsíci

    It's not for Beginners -
    First Learn PostgreSQL
    Second Learn Spring Boot
    Then you can follow up with this project

  • @akmalamien4958
    @akmalamien4958 Před rokem

    This is so fun ! thanks bro

  • @adarshpandey7089
    @adarshpandey7089 Před rokem

    How those two table are generated ,is it done already manually aur created automatically ?

  • @user-fs7uw8if2v
    @user-fs7uw8if2v Před 2 měsíci

    Hey where can i get db dump?

  • @sreenathreddy8747
    @sreenathreddy8747 Před rokem

    To beginners means a person without knowledge of the java basics even syntax also can understand this course?? can a person directly understand spring boot without basics of java core or java basic ?? please make a detailed video that a person without the knowledge of java basics can also understand spring boot.

    • @amaanullah13
      @amaanullah13 Před rokem +1

      🤡that's like learning to make Biryani without knowing how to make Maggi

  • @iamdivyaprakash
    @iamdivyaprakash Před rokem

    Really very nice and helpful sir

  • @akmalamien4958
    @akmalamien4958 Před rokem +2

    where can i get the database

    • @PrabinManShrestha
      @PrabinManShrestha Před 11 měsíci

      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');

  • @SurajPatil-yt8zc
    @SurajPatil-yt8zc Před 6 měsíci

    Can someone share the database file for this project for MYSQL