mirror of https://github.com/halo-dev/halo
Change dev database config from mysql to h2
parent
2db1669e3f
commit
545bb023eb
|
@ -18,7 +18,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableJpaAuditing
|
@EnableJpaAuditing
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@EnableJpaRepositories(basePackages = {"run.halo.app.repository"}, repositoryBaseClass = BaseRepositoryImpl.class)
|
@EnableJpaRepositories(basePackages = "run.halo.app.repository", repositoryBaseClass = BaseRepositoryImpl.class)
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class SwaggerConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
public Docket haloDefaultApi() {
|
public Docket haloDefaultApi() {
|
||||||
log.debug("Doc disabled: [{}]", haloProperties.getDocDisabled());
|
log.debug("Doc disabled: [{}]", haloProperties.getDocDisabled());
|
||||||
return buildApiDocket("run.halo.app.default",
|
return buildApiDocket("run.halo.app.portal.api",
|
||||||
"run.halo.app.web.controller.portal.api",
|
"run.halo.app.web.controller.portal.api",
|
||||||
"/api/**")
|
"/api/**")
|
||||||
.enable(!haloProperties.getDocDisabled());
|
.enable(!haloProperties.getDocDisabled());
|
||||||
|
|
|
@ -22,7 +22,6 @@ public enum AttachmentProperties implements PropertyEnum {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<?> getType() {
|
public Class<?> getType() {
|
||||||
return type;
|
return type;
|
||||||
|
|
|
@ -17,16 +17,16 @@ spring:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
|
||||||
# H2database 配置
|
# H2database 配置
|
||||||
# driver-class-name: org.h2.Driver
|
driver-class-name: org.h2.Driver
|
||||||
# url: jdbc:h2:file:~/halo-dev/db/halo
|
url: jdbc:h2:file:~/halo-dev/db/halo
|
||||||
# username: admin
|
username: admin
|
||||||
# password: 123456
|
password: 123456
|
||||||
|
|
||||||
#MySql配置
|
#MySql配置
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
# url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
# username: root
|
||||||
password: 123456
|
# password: 123456
|
||||||
|
|
||||||
h2:
|
h2:
|
||||||
console:
|
console:
|
||||||
|
|
Loading…
Reference in New Issue