-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add h2 quick start doc #4861
add h2 quick start doc #4861
Conversation
Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4861 +/- ##
=========================================
Coverage 49.61% 49.62%
- Complexity 1907 1908 +1
=========================================
Files 372 372
Lines 11559 11559
Branches 1127 1127
=========================================
+ Hits 5735 5736 +1
Misses 5481 5481
+ Partials 343 342 -1 ☔ View full report in Codecov by Sentry. |
I think we need to postpone this pr until the apollo-quick-start repo is updated with the latest version. |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, since we're planning to release version 2.2.0 shortly, could you assist in writing the English documentation for the quick start guide?
538e8da
to
f223e5b
Compare
f223e5b
to
9909315
Compare
I built the apollo-all-in-one.jar using the lastest master code by following the manually build steps and run the start script with the following changes to the demo.sh:
However, some errors occurred. I'm unsure why, as the same configurations function correctly when I run the quick start in the IDE.
|
docs/zh/deployment/quick-start.md
Outdated
apollo_portal_db_username=用户名 | ||
apollo_portal_db_password=密码(如果没有密码,留空即可) | ||
spring.profiles.group.github=h2 | ||
spring.datasource.url=jdbc:h2:mem:testdb;mode=mysql;DATABASE_TO_UPPER=FALSE;BUILTIN_ALIAS_OVERRIDE=TRUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is ok to use testdb
same as apollo config db?
How about change it to portaldb here, and change above testdb
to configdb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I build and get apollo-portal-2.2.0-SNAPSHOT-github.zip
change database to h2, It start successflly.
But on runtime, when access http://localhost:8070/ it return HTTP Status 500 – Internal Server Error
, in apollo-portal.log
2023-12-04 23:10:50.491 ERROR 1790 --- [http-nio-8070-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT S.PRIMARY_ID, S.SESSION_ID, S.CREATION_TIME, S.LAST_ACCESS_TIME, S.MAX_INACTIVE_INTERVAL, SA.ATTRIBUTE_NAME, SA.ATTRIBUTE_BYTES FROM SPRING_SESSION S LEFT JOIN SPRING_SESSION_ATTRIBUTES SA ON S.PRIMARY_ID = SA.SESSION_PRIMARY_ID WHERE S.SESSION_ID = ?]; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "SPRING_SESSION" not found; SQL statement:
SELECT S.PRIMARY_ID, S.SESSION_ID, S.CREATION_TIME, S.LAST_ACCESS_TIME, S.MAX_INACTIVE_INTERVAL, SA.ATTRIBUTE_NAME, SA.ATTRIBUTE_BYTES FROM SPRING_SESSION S LEFT JOIN SPRING_SESSION_ATTRIBUTES SA ON S.PRIMARY_ID = SA.SESSION_PRIMARY_ID WHERE S.SESSION_ID = ? [42102-214]
...
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "SPRING_SESSION" not found; SQL statement:
SELECT S.PRIMARY_ID, S.SESSION_ID, S.CREATION_TIME, S.LAST_ACCESS_TIME, S.MAX_INACTIVE_INTERVAL, SA.ATTRIBUTE_NAME, SA.ATTRIBUTE_BYTES FROM SPRING_SESSION S LEFT JOIN SPRING_SESSION_ATTRIBUTES SA ON S.PRIMARY_ID = SA.SESSION_PRIMARY_ID WHERE S.SESSION_ID = ? [42102-214]
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "SPRING_SESSION" not found
docs/zh/deployment/quick-start.md
Outdated
apollo_config_db_url="jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8&serverTimezone=Asia/Shanghai" | ||
apollo_config_db_username=用户名 | ||
apollo_config_db_password=密码(如果没有密码,留空即可) | ||
spring.profiles.group.github=h2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I change https://github.com/apolloconfig/apollo-quick-start/blob/master/demo.sh
and run
./demo.sh start
There are something wrong...
./demo.sh: line 33: spring.profiles.group.github=h2: command not found
./demo.sh: line 34: spring.datasource.url=jdbc:h2:mem:testdb: command not found
./demo.sh: line 35: spring.datasource.username=sa: command not found
./demo.sh: line 36: spring.datasource.password=: command not found
./demo.sh: line 39: spring.profiles.group.github=h2: command not found
./demo.sh: line 40: spring.datasource.url=jdbc:h2:mem:testdb: command not found
./demo.sh: line 41: spring.datasource.username=sa: command not found
./demo.sh: line 42: spring.datasource.password=: command not found
so it need to spring_profiles_group_github ?
spring.profiles.group.github=h2 | |
spring_profiles_group_github =h2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When use https://github.com/apolloconfig/apollo-quick-start/blob/master/demo.sh meet some error
Caused by: java.lang.RuntimeException: Failed to load driver class org.h2.Driver in either of HikariConfig class loader or Thread context classloader
at com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:491)
9909315
to
1d1d7b0
Compare
@shoothzj |
I've made some changes to the demo.sh script and it works perfectly on my laptop. Please give this version a try:
BTW, I'm considering using H2 as the default database for Apollo Quickstart. What are your thoughts on this? |
@nobodyiam I think it's reasonable to use h2 as default database in quick start. I created a draft PR: apolloconfig/apollo-quick-start#111 |
@dosu-bot Caused by: java.lang.RuntimeException: Failed to load driver class org.h2.Driver in either of HikariConfig class loader or Thread context classloader |
The quick start doc was updated in #5035 |
What's the purpose of this PR
Since #4851 has been merged, add related docs.
Follow this checklist to help us incorporate your contribution quickly and easily: