protected List getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) {
List configurations = SpringFactoriesLoader.loadFactoryNames(getSpringFactoriesLoaderFactoryClass(),
getBeanClassLoader());
Assert.notEmpty(configurations, "No auto configuration classes found in META-INF/spring.factories. If you "
+ "are using a custom packaging, make sure that file is correct.");
return configurations;
}
4.0.0org.springframework.bootspring-boot-starter-parent2.1.8.RELEASEcom.twp.springgreeting-spring-boot-starter0.0.1-SNAPSHOTcustomer-spring-boot-starterDemo project for Spring Boot12com.twp.springspringbooot-autoconfiguration0.0.1-SNAPSHOTorg.apache.maven.pluginsmaven-compiler-plugin1212
springbooot-autoconfiguration 中需要实例化的服务类
package com.twp.spring.server;
import com.twp.spring.properties.GreetingServerProperties;
public class GreetingServer {
private GreetingServerProperties properties;
public String greet(){
return properties.getTarget() + ":" + properties.getMessage();
}
public GreetingServerProperties getProperties() {
return properties;
}
public void setProperties(GreetingServerProperties properties) {
this.properties = properties;
}
}
GreetingServerProperties属性类
package com.twp.spring.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.io.Serializable;
@ConfigurationProperties(prefix = "greeting")
public class GreetingServerProperties implements Serializable {
private static final long serialVersionUID = -225936785539739342L;
private String target;
private String message;
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
4.0.0org.springframework.bootspring-boot-starter-parent2.1.8.RELEASEcom.twp.springspringbooot-autoconfiguration0.0.1-SNAPSHOTjarspringbooot-autoconfigurationDemo project for Spring Boot12org.springframework.bootspring-boot-autoconfigureorg.springframework.bootspring-boot-configuration-processororg.apache.maven.pluginsmaven-compiler-plugin1212
在spring.factories文件中配置自动配置类
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.twp.spring.configuration.GreetingServerAutoConfiguration
刚在一台IBM Xserver服务器上装了RedHat Linux Enterprise AS 4,为了提高网络的可靠性配置双网卡绑定。
一、环境描述
我的RedHat Linux Enterprise AS 4安装双口的Intel千兆网卡,通过ifconfig -a命令看到eth0和eth1两张网卡。
二、双网卡绑定步骤:
2.1 修改/etc/sysconfig/network
1.AdviceMethods.java
package com.bijian.study.spring.aop.schema;
public class AdviceMethods {
public void preGreeting() {
System.out.println("--how are you!--");
}
}
2.beans.x
包括Spark Streaming在内的实时计算数据可靠性指的是三种级别:
1. At most once,数据最多只能接受一次,有可能接收不到
2. At least once, 数据至少接受一次,有可能重复接收
3. Exactly once 数据保证被处理并且只被处理一次,
具体的多读几遍http://spark.apache.org/docs/lates
具体思路参见:http://zhedahht.blog.163.com/blog/static/25411174200712895228171/
import java.util.ArrayList;
import java.util.List;
public class MinStack {
//maybe we can use origin array rathe
日期转换函数的详细使用说明
DATE_FORMAT(date,format) Formats the date value according to the format string. The following specifiers may be used in the format string. The&n