Spring Boot Connect to Microsoft SQL Server Example

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 68

  • @kaarlharster769
    @kaarlharster769 3 роки тому +3

    Thank you! Very well done. Easy to follow. Very Helpful!

    • @CodeJava
      @CodeJava  3 роки тому

      Glad it was helpful!

  • @tuanbruh2148
    @tuanbruh2148 5 місяців тому +2

    tuyệt vời luôn đúng cái e cần, bắn tiếng anh đúng đỉnh :v

    • @CodeJava
      @CodeJava  5 місяців тому +1

      cảm ơn em :)

  • @bigbeast007
    @bigbeast007 Рік тому +1

    Sorry, couldn't quite understand what the "sqlsrv" in the spring.datasource.url is for?

    • @CodeJava
      @CodeJava  Рік тому

      that's the hostname of my computer. It can be localhost if you use local SQL server.

  • @skipa9906
    @skipa9906 2 роки тому

    Thank you for the tutorial. How can I do the connection to Hadoop?

  • @jecoy9413
    @jecoy9413 Рік тому

    Hi can you create an example using it in another class? It seems like it can only be used in Controller class. When using it other than the controller class it does not get initialized.

  • @kinucc3831
    @kinucc3831 3 роки тому +1

    Login failed for user ''. ClientConnectionId:f85cc665-9f31-4438-8a1c-3fed3f42dac7 i see this provlem, what must i do?

  • @VictorEspinoza-e1v
    @VictorEspinoza-e1v 3 місяці тому

    Thank you! Very well done.

    • @CodeJava
      @CodeJava  3 місяці тому

      Glad it was helpful!

  • @SoporteDonga
    @SoporteDonga 7 місяців тому

    HI, I have a error "Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled." Can you Helpme?, please, thnks

    • @CodeJava
      @CodeJava  7 місяців тому

      kindly provide full exception details so I can figure out what went wrong.

  • @svalyavasvalyava9867
    @svalyavasvalyava9867 Рік тому

    this video is just awesome, thank you infinitely! 😊

  • @deepeshgupta8612
    @deepeshgupta8612 3 роки тому

    When I am doing CRUD operation with SQL server.
    Updating the record is not working, while using same save() which is provided by JPARepository.
    While updating the record it creates new record in DB.
    Making GenerationType "IDENTITY", also in DB making primary column as a "Is Identity" YES.
    Can u please help me on this. thank you!!

    • @CodeJava
      @CodeJava  3 роки тому

      kindly tell the error in details.

  • @AMServiceNowDeveloper
    @AMServiceNowDeveloper 4 роки тому +1

    This is what I'm waiting for 🌟

  • @quangnguyenxuan2827
    @quangnguyenxuan2827 2 роки тому

    I have a error "Could not autowire. No beans of 'JdbcTemplate' type found." How i can't fix it :(

    • @CodeJava
      @CodeJava  2 роки тому

      make sure you have spring-boot-starter-jdbc dependency in the pom.xml file

  • @shreyatiwari9772
    @shreyatiwari9772 Рік тому

    where did you add the sql auth dll?

  • @gnanasaikalupudi804
    @gnanasaikalupudi804 3 роки тому +1

    Could you please create an example using windows authentication

  • @solomonlapiana122
    @solomonlapiana122 Рік тому

    what if we are using "windows authentication" instead of "sql server authentication" for our sql server? what do we put in the application.properties file then?

    • @CodeJava
      @CodeJava  Рік тому +1

      Windows authentication uses the current user account so you don't have to specify username and password.

  • @senay.1444
    @senay.1444 3 роки тому +1

    Hi, my output is like this for each student: com.example.demo.Student@6137cf6e
    Why doesn't it show up in list form?

    • @CodeJava
      @CodeJava  3 роки тому +1

      you need to override toString() method in Student class, to print details of the student.

    • @senay.1444
      @senay.1444 3 роки тому

      @@CodeJava Thank you

  • @jessyvis5000
    @jessyvis5000 3 роки тому +2

    Eres un héroe !!! Thanks

  • @uber7586
    @uber7586 2 роки тому

    Simply put, great guide

  • @mattsalis1935
    @mattsalis1935 3 роки тому

    hello, im doing the jpa part step by step, but as I execute the program it deletes all the content from the table, and it outputs nothing, I would apreciate any help

    • @CodeJava
      @CodeJava  3 роки тому

      hmm, it seems not relate to this video, right?

    • @mattsalis1935
      @mattsalis1935 3 роки тому

      @@CodeJava hmm I'm literally doing what the video says, how its not related?

    • @CodeJava
      @CodeJava  3 роки тому

      @@mattsalis1935 sorry, I was thinking about another video. you mean select query deletes the table?

    • @minigirl
      @minigirl 2 роки тому

      That mean it was successful done lol

  • @trioanngoc9417
    @trioanngoc9417 3 роки тому

    i did everything follow the video. but i'm facing the problem "@org.springframework.beans.factory.annotation.Autowired(required=true)" and i dont know why. could you give me a hint or any clue

    • @CodeJava
      @CodeJava  3 роки тому

      for @Autowired to work, you must annotate the autowired class using @Component, @Service, @Repository....

    • @trioanngoc9417
      @trioanngoc9417 3 роки тому

      @@CodeJava i fixed it. But my problem is The project is broken down to piecies. So i have to declare where is Component and Repository. Thank for your help

  • @jahs4488
    @jahs4488 3 роки тому

    hello, if you wanted to use the two databases: customer and students. How would the spring.datasource.url connection look like? please!!!

    • @CodeJava
      @CodeJava  3 роки тому

      the datasource url can point to only one databasel

    • @jahs4488
      @jahs4488 3 роки тому

      @@CodeJava I did the example you have and if I can target both. I leave the data:
      spring.datasource.url=jdbc:sqlserver://sqlsrv\\sqlexpress:1433;databaseName=customer;databaseName =students

    • @gransam
      @gransam 3 роки тому +1

      connect to any of the 2 databases and access the other through the query, example: select * from databaseName.dbo.TableName

    • @jahs4488
      @jahs4488 3 роки тому

      @@gransam lol... you're right

  • @nidhijaiswal6419
    @nidhijaiswal6419 Рік тому

    how did u get the customer.class?

    • @CodeJava
      @CodeJava  Рік тому

      It was written at 9:00 in this video.

  • @brandonalexis8263
    @brandonalexis8263 3 роки тому

    I followed the video step by step but when executing at the end I got this error
    login failed for user 'user1'. clientconnectionid: b079867b-c338-45d5-a3a8-4dda7ab8516b
    The user is created and defined in the properties along with the password, what can I do to solve it

    • @CodeJava
      @CodeJava  3 роки тому

      I think either username or password is incorrect.

  • @salman_shaik
    @salman_shaik 2 роки тому

    I faced "Query not specified for name findByNameAndCity" JPA API access exception while running a custom native query with mssql

    • @salman_shaik
      @salman_shaik 2 роки тому

      @Query(value="select * from Users where name= ?1 and city= ?2",nativeQuery=true)
      List findByNameAndCity(String name,String city);

    • @CodeJava
      @CodeJava  2 роки тому

      Hmm, I have no idea why.

  • @VietLe-fp7me
    @VietLe-fp7me 6 місяців тому +1

    cảm ơn a nhìu :)))

  • @shrey007sshikhare4
    @shrey007sshikhare4 2 роки тому

    How to call SQL scaler function from springboot application

    • @CodeJava
      @CodeJava  2 роки тому

      consider using native query. Follow this video: ua-cam.com/video/yXwHu6g-wlY/v-deo.html

  • @rayhallquist6199
    @rayhallquist6199 2 роки тому

    nice job thanks!

    • @CodeJava
      @CodeJava  2 роки тому

      Glad you liked it!

  • @pranitawadavkar5493
    @pranitawadavkar5493 3 роки тому

    Can you please provide git repository of this code..

    • @CodeJava
      @CodeJava  3 роки тому

      you can find code in this article: www.codejava.net/frameworks/spring-boot/connect-to-microsoft-sql-server-examples

  • @niamanahed8980
    @niamanahed8980 3 роки тому

    thank you

  • @longvan7786
    @longvan7786 3 роки тому +1

    OK

  • @mandyronald8187
    @mandyronald8187 Рік тому

    am feeling sleepy

    • @CodeJava
      @CodeJava  Рік тому

      Sorry to hear that. I hope you can still follow it.

  • @adibasiddiqui6438
    @adibasiddiqui6438 Рік тому

    Please give use an example on how to connect Windows Authentication SQL Server with Springboot
    Or please give me your number I want help Plz