I recently had the same problem with java app(Spring Boot) connecting with a domain user and wasting a few days doing it, but I managed, here's how I did it, hope it helps:
pom.xml:
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.3.1</version>
</dependency>
properties file:
jdbc:jtds:sqlserver://host:port;databaseName=dbname;instance=SQLDEV;domain=domainname.corp;user=userdb;password=p4ssw0rd;
example:
my file has too many options remove it if you don't use it
spring.application.name=app-name
spring.profiles.active=dev
spring.datasource.hikari.connection-test-query=SELECT 1
spring.datasource.url=jdbc:jtds:sqlserver://100.50.50.56/MinWeb;instance=SQLDEV;domain=domainname.corp;user=userdb;password=password;
spring.datasource.test-while-idle=true
spring.datasource.validation-query=SELECT 1
spring.datasource.time-between-eviction-runs-millis=60000
spring.datasource.remove-abandoned=true
spring.datasource.driver-class-name=net.sourceforge.jtds.jdbc.Driver
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none
spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServerDialect
spring.jpa.properties.hibernate.hbm2ddl.auto=none
Here are some links that I consulted:
Connect To SQL Server With Windows Authentication From A Linux Machine Through JDBC
Configure HikariCP in Spring Boot with JTDS
Create a jTDS connection string
T+