jiangqiang2020

  • 折翼天使 你要是自己开发一套系统,并且接口和halo接口一样的话是可以的。但事实上,很难实现,halo的接口很多,而且功能也很多。足足有六万多行Java源码(软件自动统计),仅插件系统估计都很少有人能仿写出来。

    • 实现了自动备份功能,以及备份文件有效时长设置。官方开发插件相关的文档感觉还是比较简陋,多数API都是自己看源码琢磨用法的,代码不够规范,但是插件对原有项目侵入性较小。有啥bug都可以直接给我提,我不太喜欢用github,访问慢,可以直接联系我QQ,个人博客。
      https://www.jiangqiang.top/archives/halozi-dong-bei-fen-cha-jian

    • Ryan Wang 👍
      Version: 1.4.16
      2022-05-20 09:03:21.869 INFO 7 --- [ main] run.halo.app.Application : Starting Application v1.4.16 using Java 11.0.11 on 67bd87d91f92 with PID 7 (/application/BOOT-INF/classes started by root in /application)
      2022-05-20 09:03:21.872 INFO 7 --- [ main] run.halo.app.Application : No active profile set, falling back to default profiles: default
      2022-05-20 09:03:23.329 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
      2022-05-20 09:03:23.478 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 138 ms. Found 22 JPA repository interfaces.
      2022-05-20 09:03:24.750 INFO 7 --- [ main] org.eclipse.jetty.util.log : Logging initialized @4179ms to org.eclipse.jetty.util.log.Slf4jLog
      2022-05-20 09:03:25.019 INFO 7 --- [ main] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 8090
      2022-05-20 09:03:25.030 INFO 7 --- [ main] org.eclipse.jetty.server.Server : jetty-9.4.42.v20210604; built: 2021-06-04T17:33:38.939Z; git: 5cd5e6d2375eeab146813b0de9f19eda6ab6e6cb; jvm 11.0.11+9
      2022-05-20 09:03:25.073 INFO 7 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring embedded WebApplicationContext
      2022-05-20 09:03:25.074 INFO 7 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3126 ms
      2022-05-20 09:03:25.378 INFO 7 --- [ main] run.halo.app.config.HaloConfiguration : Halo cache store load impl : [class run.halo.app.cache.InMemoryCacheStore]
      2022-05-20 09:03:25.536 INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
      2022-05-20 09:03:25.909 INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
      2022-05-20 09:03:26.718 INFO 7 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
      2022-05-20 09:03:26.782 INFO 7 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.32.Final
      2022-05-20 09:03:26.826 INFO 7 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
      2022-05-20 09:03:27.025 INFO 7 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
      2022-05-20 09:03:28.436 INFO 7 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
      2022-05-20 09:03:28.447 INFO 7 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
      2022-05-20 09:03:29.368 INFO 7 --- [ main] org.eclipse.jetty.server.session : DefaultSessionIdManager workerName=node0
      2022-05-20 09:03:29.369 INFO 7 --- [ main] org.eclipse.jetty.server.session : No SessionScavenger set, using defaults
      2022-05-20 09:03:29.371 INFO 7 --- [ main] org.eclipse.jetty.server.session : node0 Scavenging every 660000ms
      2022-05-20 09:03:29.382 INFO 7 --- [ main] o.e.jetty.server.handler.ContextHandler : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@13c36d48{application,/,[file:///tmp/jetty-docbase.8090.7092200866834451686/, jar:file:/application/BOOT-INF/lib/springfox-swagger-ui-3.0.0.jar!/META-INF/resources],AVAILABLE}
      2022-05-20 09:03:29.382 INFO 7 --- [ main] org.eclipse.jetty.server.Server : Started @8813ms
      2022-05-20 09:03:30.178 INFO 7 --- [ main] run.halo.app.handler.file.FileHandlers : Registered 9 file handler(s)
      2022-05-20 09:03:33.456 INFO 7 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 4 endpoint(s) beneath base path '/api/admin/actuator'
      2022-05-20 09:03:33.522 INFO 7 --- [ main] o.e.j.s.h.ContextHandler.application : Initializing Spring DispatcherServlet 'dispatcherServlet'
      2022-05-20 09:03:33.523 INFO 7 --- [ main] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
      2022-05-20 09:03:33.524 INFO 7 --- [ main] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
      2022-05-20 09:03:33.539 INFO 7 --- [ main] o.e.jetty.server.AbstractConnector : Started ServerConnector@21e5f0b6{HTTP/1.1, (http/1.1)}{0.0.0.0:8090}
      2022-05-20 09:03:33.540 INFO 7 --- [ main] o.s.b.web.embedded.jetty.JettyWebServer : Jetty started on port(s) 8090 (http/1.1) with context path '/'
      2022-05-20 09:03:33.568 INFO 7 --- [ main] run.halo.app.Application : Started Application in 12.381 seconds (JVM running for 12.999)
      2022-05-20 09:03:33.570 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Starting migrate database...
      2022-05-20 09:03:33.647 INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 7.5.1 by Redgate
      2022-05-20 09:03:33.657 INFO 7 --- [ main] o.f.c.i.database.base.DatabaseType : Database: jdbc:h2:file:/root/.halo//db/halo (H2 1.4)
      2022-05-20 09:03:33.703 INFO 7 --- [ main] o.f.c.i.s.JdbcTableSchemaHistory : Repair of failed migration in Schema History table "PUBLIC"."flyway_schema_history" not necessary. No failed migration detected.
      2022-05-20 09:03:33.725 INFO 7 --- [ main] o.f.core.internal.command.DbRepair : Successfully repaired schema history table "PUBLIC"."flyway_schema_history" (execution time 00:00.042s).
      2022-05-20 09:03:33.728 INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 7.5.1 by Redgate
      2022-05-20 09:03:33.745 INFO 7 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 4 migrations (execution time 00:00.011s)
      2022-05-20 09:03:33.772 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": 4
      2022-05-20 09:03:33.779 INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Schema "PUBLIC" is up to date. No migration necessary.
      2022-05-20 09:03:33.780 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Migrate database succeed.
      2022-05-20 09:03:33.967 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Halo started at https://www.qianyi.xin
      2022-05-20 09:03:33.967 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Halo admin started at https://www.qianyi.xin/admin
      2022-05-20 09:03:33.967 INFO 7 --- [ main] run.halo.app.listener.StartedListener : Halo has started successfully!
      2022-05-20 15:19:15.531 WARN 7 --- [p1796615884-194] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]

    • Ryan Wang 👍
      我是这么配置的,感觉没什么问题啊,而且我远程直接连mysql都可以连上。

      `server:
      ? port: 8090

      Response data gzip.

      ? compression:
      ? ? enabled: false
      spring:
      ? datasource:

      H2 database configuration.

      #? ? driver-class-name: org.h2.Driver
      #? ? url: jdbc:h2:file:~/.halo/db/halo
      #? ? username: admin
      #? ? password: 123456

      MySQL database configuration.

      ? ? driver-class-name: com.mysql.cj.jdbc.Driver
      ? ? url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
      ? ? username: root
      ? ? password: 密码

      H2 database console configuration.

      #? h2:
      #? ? console:
      #? ? ? settings:
      #? ? ? ? web-allow-others: false
      #? ? ? path: /h2-console
      #? ? ? enabled: false

      halo:

      Your admin client path is https://your-domain/{admin-path}

      ? admin-path: admin

      memory or level

      ? cache: memory
      `

      • docker run -it -d --name halo -p 8090:8090 -v ~/.halo:/root/.halo --restart=unless-stopped halohub/halo

        使用上面命令部署的,.halo目录下有application.yaml文件,但是里面的配置完全不生效,我使用的是mysql配置,但是启动之后mysql数据库没有数据,而且这个配置文件我删了居然也可以正常启动。
        我自己进入容器也看见有这个配置文件,而且内容确实是mysql的配置。

        • 希望编辑文章的时候能自动保存文章内容到sessionstorage,这样就可以防止页面不小心刷新之后数据丢失。