Commit 7ef6b679 by 吴博
parents 61bff431 5e05a3bd
......@@ -15,7 +15,7 @@
<name>pcloud-common-core</name>
<properties>
<universe-error-alarm.version>3.0.1-SNAPSHOT</universe-error-alarm.version>
</properties>
<dependencies>
......@@ -50,6 +50,17 @@
<artifactId>jackson-mapper-asl</artifactId>
</dependency>
<!-- Jackson End -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<dependency>
<groupId>com.pcloud.universe</groupId>
<artifactId>universe-error-alarm</artifactId>
<version>${universe-error-alarm.version}</version>
</dependency>
</dependencies>
</project>
......@@ -41,6 +41,10 @@ public class DataSourceConfig {
public static final String SESSION_FACTORY_NAME = "sqlSessionFactory";
public static final String SESSION_TEMPLATE_NAME = "sqlSessionTemplate";
static {
System.setProperty("druid.mysql.usePingMethod","false");
}
private String url;
private String type;
......
......@@ -108,5 +108,6 @@ public enum AppProductTypeEnum {
AppTypeEnum.TEST_PAPER.value, AppTypeEnum.AUDIO.value, AppTypeEnum.VIDEO.value, AppTypeEnum.MATCH_LISTEN.value,
AppTypeEnum.PBSTORY.value, AppTypeEnum.WORD_DICTATION.value, AppTypeEnum.ENGLISH_WALKMAN.value,
AppTypeEnum.ARTICLE_READING.value, AppTypeEnum.ORAL_EVALUATION.value, AppTypeEnum.IMAGE.value,
AppTypeEnum.STROKE_ORDER.value, AppTypeEnum.SUBJECTNOTE.value, AppTypeEnum.ZSCORE.value, AppTypeEnum.RECITE_WORD.value};
AppTypeEnum.STROKE_ORDER.value, AppTypeEnum.SUBJECTNOTE.value, AppTypeEnum.ZSCORE.value, AppTypeEnum.RECITE_WORD.value,
AppTypeEnum.ARTICLE.value};
}
......@@ -14,8 +14,8 @@ import java.util.ResourceBundle;
* @创建时间:2016年3月10日,上午11:46:33
* @版本:1.0
*/
public class ResourceUtils {
private ResourceBundle resourceBundle;
class ResourceUtils {
private ResourceBundle resourceBundle;
private ResourceUtils(String resource) {
resourceBundle = ResourceBundle.getBundle(resource);
......@@ -26,7 +26,7 @@ private ResourceBundle resourceBundle;
* @param resource 资源
* @return 解析
*/
public static ResourceUtils getResource(String resource) {
static ResourceUtils getResource(String resource) {
return new ResourceUtils(resource);
}
......@@ -36,7 +36,7 @@ private ResourceBundle resourceBundle;
* @param args value中参数序列,参数:{0},{1}...,{n}
* @return
*/
public String getValue(String key, Object... args) {
String getValue(String key, Object... args) {
String temp = resourceBundle.getString(key);
return MessageFormat.format(temp, args);
}
......@@ -45,7 +45,7 @@ private ResourceBundle resourceBundle;
* 获取所有资源的Map表示
* @return 资源Map
*/
public Map<String, String> getMap() {
Map<String, String> getMap() {
Map<String, String> map = new HashMap<String, String>();
for(String key: resourceBundle.keySet()) {
map.put(key, resourceBundle.getString(key));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment