I am new to Java and using Java Spring Boot 3.3.0 in IntelliJ
-
Our SQL Server database is not on port 1433, it’s on a different port, say port 12345.
How can I connect to it on port 12345 ? -
Also, how can I connect using Windows Authentication ?
spring.datasource.url=jdbc:sqlserver://sqlsrvmyServer:12345;databaseName=myDb;integratedSecurity=true
Is that connection string correct ?
I am getting this error running it
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'jdbcMappingContext' defined in class path
resource [org/springframework/boot/autoconfigure/data/jdbc/
JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]:
Unsatisfied dependency expressed through method 'jdbcMappingContext' parameter 1: Error
creating bean with name 'jdbcCustomConversions' defined in class path resource
[org/springframework/boot/autoconfigure/data/jdbc/
JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]:
Failed to instantiate
[org.springframework.data.jdbc.core.convert.JdbcCustomConversions]:
Factory method 'jdbcCustomConversions' threw exception with message: Error creating
bean with name 'jdbcDialect' defined in class path resource
[org/springframework/boot/autoconfigure/data/jdbc/
JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]:
Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]:
Factory method 'jdbcDialect' threw exception with message:
Failed to obtain JDBC Connection
Thank you in advance