Comments (1)
Could you please let me know how can we support this application on MySQL instead of DB2?
This example uses H2, an in-memory relational database, and not DB2.
Once this example uses Spring Data JPA, just remove the H2 dependency from the pom.xml file and add the MySQL connection details to the application.yaml
file:
spring:
jpa:
hibernate:
ddl-auto: create
datasource:
url: jdbc:mysql://localhost:3306/example
username: user
password: password
driver-class-name: com.mysql.jdbc.Driver
The property spring.jpa.hibernate.ddl-auto
tells Hibernate how to deal with the database schema. When set to create
, the database will be created when the Hibernate SessionFactory
opens (but it won't be dropped the session factory closes).
For more details, refer to this article about accessing data in MySQL with Spring Data.
Also, I am trying to use this as backend for an Android app and I don't want the token to expire. Could you please suggest a way?
In JWT, the exp
claim indicates the expiration time of the token and its use is optional according to the RFC 7519. If you want a token to be valid forever, just omit the exp
claim from the token. See the code here.
from jersey-jwt-springsecurity.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jersey-jwt-springsecurity.