If we want to use windows authentication in our Java project, we need to modify the following content.
目录
Modify the SQL connection string.
1.Use the following code to get the path URL.
2. Put the driver-dll to the path of step1
3. Put the driver-jar to the path of step1
Modify the SQL connection string.
spring.datasource.url=jdbc:sqlserver://localhost:1433;databaseName=dbname;integratedSecurity=true;
Modify the local environment
1.Use the following code to get the path URL.
System.out.println(System.getProperty("java.library.path"))
2. Put the driver-dll to the path of step1
3. Put the driver-jar to the path of step1
please use “java -version” to check what is the JDK bit? If 32 bit, please use the dll of 32, if 64 bit, please use the dll of 64.