拥有此项目依赖项:
"dependencies": {
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/forms": "2.0.0-rc.6",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/router": "3.0.0-rc.2",
"ng2-bootstrap": "^1.1.1",
"reflect-metadata": "^0.1.8",
"core-js": "^2.4.0",
"es6-module-loader": "^0.17.8",
"rxjs": "5.0.0-beta.11",
"systemjs": "0.19.27",
"zone.js": "0.6.17",
"jquery": "3.0.0",
}
Run Code Online (Sandbox Code Playgroud)
这个登录模板:
<form #loginForm="ngForm" (ng-submit)="authenticate(loginForm.value)">
</form>
Run Code Online (Sandbox Code Playgroud)
而这个登录组件:
import { Component } from '@angular/core';
import {Http, Headers} from '@angular/http';
@Component({
moduleId: module.id,
selector: 'login-cmp',
templateUrl: 'login.component.html'
})
export class LoginComponent {
constructor($http: Http) {
this.$http = $http;
}
authenticate(data) {
...
}
}
Run Code Online (Sandbox Code Playgroud)
我有这个错误:
zone.js?1474211973422:484 Unhandled …Run Code Online (Sandbox Code Playgroud) 使用@Transactional(value ="erpJPA",propagation = Propagation.NESTED)我有例外
Caused by: org.springframework.transaction.NestedTransactionNotSupportedException:
JpaDialect does not support savepoints - check your JPA provider's capabilities
Run Code Online (Sandbox Code Playgroud)
firebird不支持1.5版的嵌套事务吗?
例如:
static private DateFormat df = new SimpleDateFormat();
public static void format(final Date date) {
for (int i = 0; i < 10; i++)
new Thread(new Runnable() {
public void run() {
System.out.println(df.format(date));
}
});
}
Run Code Online (Sandbox Code Playgroud)
将DateFormat类记录为不同步类,但如果我们只使用格式方法,它不能改变整个阶级的地位?
假设它被声明为私有,如何确保代码是线程安全的?
修复此代码的最佳方法是什么?:
为每个线程使用不同的实例.
使用同步块.
请不要告诉我许可证问题.
我只是希望能够同时在两个环境(Android/IOS)中测试我的代码.
我对IOS的虚拟化不感兴趣,因为它非常慢.
使用该插件io.spring.dependency-management,我的某些依赖项版本可以从其他依赖项中扣除
id("io.spring.dependency-management") version "1.0.6.RELEASE"
dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
}
Run Code Online (Sandbox Code Playgroud)
使用gradlew clean build install
确实使用不包含许多依赖项版本的 pom 安装 jar。
运行依赖于第一个 JAR 的另一个子模块的构建,结果为:
Errors occurred while build effective model from C:\APPLIS\HELIOSDEV\repo\com\sfr\ext_ope\library_ext_ope_admin\
0.0.1-SNAPSHOT\library_ext_ope_admin-0.0.1-SNAPSHOT.pom:
'dependencies.dependency.version' for io.github.jhipster:jhipster-framework:jar
is missing. in com.sfr.ext_ope:library_ext_ope_admin:0.0.1-SNAPSHOT
Run Code Online (Sandbox Code Playgroud)
如何强制构建在生成的 pom 中添加版本?
拥有超过520个表的ERP数据库,EntityPersister的postInstanciate非常慢并且消耗超过512M,这对于仅一个会话Factory而言,应用程序变得非常慢.
拥有这个实体
@Table(keyspace = KEYSPACE)
public class CE_TimeSeries extends Entity implements TimeSeriesPoint{
@PartitionKey(1)
private String typeId;
@ClusteringColumn(value=1, asc=true)
private String userId;
@ClusteringColumn(value=2, asc=true)
private Date startDate;
@Column
private Date endDate;
@Column
private int groupInterval;
@Column
private int interval;
}
Run Code Online (Sandbox Code Playgroud)
这个CQL
SELECT startDate, endDate, groupInterval, interval FROM CE_TimeSeries WHERE typeId
= :typeId and userId = :userId and ( endDate >= :fromDate or ( startDate >=
:fromDate and startDate <= :toDate ) )
Run Code Online (Sandbox Code Playgroud)
给出例外:
Caused by: com.datastax.driver.core.exceptions.SyntaxError: line 1:142
mismatched input 'or' expecting …Run Code Online (Sandbox Code Playgroud) 上课:
public abstract class A{
//i need a shared setter here to do some common code.
}
public class B extends A{
private Long id;
public void setId(Long id){
this.id = id;
}
}
public class C extends A{
private String id;
public void setId(String id){
this.id = id;
}
}
Run Code Online (Sandbox Code Playgroud)
最好的方法是什么,我不知道它是否与"动态代理"有关系?
有这个错误
java.lang.NumberFormatException: For input string: "20,00"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at com.agitech.autofaces.el.FormatUtil.parseDouble(FormatUtil.java:122)
at com.agitech.erp.converter.DoubleConverter.getAsObject(DoubleConverter.java:27)
Run Code Online (Sandbox Code Playgroud)
读完十进制分隔符数字格式后,我试试
public class FormatUtil {
public static char ApplicationDecimalSeparator = ',';
public static char SystemDecimalSeparator;
static {
DecimalFormatSymbols symbols= DecimalFormatSymbols.getInstance();
SystemDecimalSeparator = symbols.getDecimalSeparator();
symbols.setDecimalSeparator(ApplicationDecimalSeparator);
}
public final static Double parseDouble(String d){
if (d==null)
return 0.0;
return Double.parseDouble( fixDecimalSeparator(d) );
}
public final static String fixDecimalSeparator(String d){
if (SystemDecimalSeparator==ApplicationDecimalSeparator)
return d;
return d.replaceAll( ""+SystemDecimalSeparator, ""+ApplicationDecimalSeparator);
}
}
Run Code Online (Sandbox Code Playgroud)
最后SystemDecimalSeparator已经是','为什么这个例外呢?
它可能期待20.00,但如何获得和修复这个separtor?
事实上,我测试和它的预测"20.00"而默认的SystemDecimalSeparator已经是','