N
N
Nike19892017-04-16 16:31:33
Java
Nike1989, 2017-04-16 16:31:33

How to connect a database to Spring Security?

Tell me what should be in place of the question marks in order to work with the database.
This is from the Spring Security area!
And where in the project to place the database so that it normally works with this request jdbc:sqlite:localhost:8080/????????????

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
 
    <property name="driverClassName" value="org.sqlite.JDBC" />
    <property name="url" value="jdbc:sqlite://localhost:8080/???????" />
    <property name="username" value="" />
    <property name="password" value="" />
  </bean>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nike1989, 2017-04-17
@Nike1989

Thanks everyone, the issue has been resolved.
It was necessary to connect the database to the Sqlite server and then connect to its databases through the server port. And this query is correct jdbc:sqlite://localhost:8080/database name

V
Viktor Maksimov, 2017-04-17
@ValorVl

Sqlite is an embeddable database and the URI for it will be jdbc:sqlite://dirA/dirB/dbfile. Those. You need to specify the path to the directory where the database file will be (or already is).
Also note that spring itself will not create anything, the database file must exist.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question