question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add resource hints for schema and data scripts

See original GitHub issue

Schema & data files defined via properties are not added to the resource-config.json which causes application to error on first access.

java.lang.IllegalStateException: Failed to execute CommandLineRunner
    Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "xyz" not found (this database is empty);
database=h2
spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
spring.sql.init.data-locations=classpath*:db/${database}/data.sql

should translate to:

[
    { "pattern": "\\Qdb\/h2\/schema.sql\\E" },
    { "pattern": "\\Qdb\/h2\/data.sql\\E" },
]

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Jul 7, 2022

Yeah, I think that’s a good way forward.

0reactions
mhalbrittercommented, Jul 14, 2022

This can be tested with the jdbc smoke test.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quick Guide on Loading Initial Data with Spring Boot - Baeldung
A quick and practical example of using data.sql and schema.sql files in Spring Boot.
Read more >
Template structure and syntax - Azure Resource Manager
Describes the structure and properties of Azure Resource Manager templates (ARM templates) using declarative JSON syntax.
Read more >
Resource Hints - W3C
A resource hint link is a dns-prefetch , preconnect , prefetch , or prerender relationship that is used to indicate an origin or...
Read more >
How to Speed Up Magento 2 With Preconnect Resource Hints
Add Resource Hints to your Store's Head ... Since Resource Hints are link relationship elements (like stylesheets) they need to be defined in...
Read more >
2 Installing Sample Schemas - Database
Oracle Database Examples Installation Guide for download and installation ... All scripts necessary to create the Human Resource ( HR ) schema reside...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found