feat: support developer mode.

pull/398/head
ruibaby 2019-11-23 22:56:14 +08:00
parent c1292438ea
commit 4f229d3427
6 changed files with 32 additions and 4 deletions

View File

@ -1,5 +1,5 @@
plugins {
id 'org.springframework.boot' version '2.2.0.RELEASE'
id 'org.springframework.boot' version '2.2.1.RELEASE'
id "io.freefair.lombok" version "3.6.6"
// id 'war'
id 'java'

View File

@ -30,7 +30,6 @@ import run.halo.app.utils.HttpClientUtils;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.time.temporal.ChronoUnit;
/**
* Halo configuration.
@ -165,7 +164,7 @@ public class HaloConfiguration {
FilterRegistrationBean<AdminAuthenticationFilter> authenticationFilter = new FilterRegistrationBean<>();
authenticationFilter.setFilter(adminAuthenticationFilter);
authenticationFilter.addUrlPatterns("/api/admin/*", "/api/content/comments");
authenticationFilter.addUrlPatterns("/api/admin/*", "/actuator/*", "/api/content/comments");
authenticationFilter.setOrder(1);
return authenticationFilter;

View File

@ -10,11 +10,25 @@ import static run.halo.app.model.support.HaloConst.DEFAULT_THEME_ID;
*/
public enum PrimaryProperties implements PropertyEnum {
/**
* is blog installed.
*/
IS_INSTALLED("is_installed", Boolean.class, "false"),
/**
* current actived theme.
*/
THEME("theme", String.class, DEFAULT_THEME_ID),
BIRTHDAY("birthday", Long.class, "");
/**
* blog birthday
*/
BIRTHDAY("birthday", Long.class, ""),
/**
* developer mode.
*/
DEV_MODE("developer_mode", Boolean.class, "false");
private final String value;

View File

@ -42,6 +42,11 @@ spring:
max-request-size: 10240MB
cache:
type: none
management:
endpoints:
web:
exposure:
include: ['httptrace', 'metrics','env']
logging:
level:
run.halo.app: DEBUG

View File

@ -41,6 +41,11 @@ spring:
max-request-size: 10MB
cache:
type: none
management:
endpoints:
web:
exposure:
include: ['httptrace', 'metrics','env']
logging:
level:
run.halo.app: DEBUG

View File

@ -42,6 +42,11 @@ spring:
multipart:
max-file-size: 10240MB
max-request-size: 10240MB
management:
endpoints:
web:
exposure:
include: ['httptrace', 'metrics','env']
logging:
level:
run.halo.app: INFO