mardi 7 février 2017

Spring Boot application pending when trying to persist to SQL Server

Vote count: 0

I have a Spring Boot application which I'm trying to use in order to persist some data to a MSSQL instance running as a Docker container (just for dev purposes) on port 1434.

I have a @Repository class implementing from CrudRepository:

@Repository
public interface BookingRepository extends CrudRepository<Booking, Integer> {

}

And then a @Service class where I want to try and persist a booking:

public void process(Booking booking) throws IOException {
    bookingCreatedRepository.save(booking);
    log.info("After the save"); // this line is never reached
}

The thing is that the log.info line in the service snippet above is never reached. If I open up the debugger and try to force the save via an evaluation of that statement, the operation never finishes.

There are no exceptions, no timeout, nothing. The application just stops at that point.

My application.properties file:

spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.datasource.username=sa
spring.datasource.password=Password12#
spring.datasource.url=jdbc:http://sqlserverlocalhost:1434;databaseName=Reporting
spring.jpa.database=sql_server
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
spring.jpa.database-platform=SQL_SERVER

asked 18 secs ago

Let's block ads! (Why?)



Spring Boot application pending when trying to persist to SQL Server

Aucun commentaire:

Enregistrer un commentaire