4.0.0com.test.starterspring-boot-starter-autoconfigure0.0.1-SNAPSHOTspring-boot-starter-autoconfigureDemo project for Spring Boot1.8UTF-8UTF-82.3.0.RELEASEorg.springframework.bootspring-boot-starterorg.springframework.bootspring-boot-dependencies${spring-boot.version}pomimport
4.创建配置类和自动配置类
xxxProperties:
@Component
@ConfigurationProperties(prefix = "hello")
public class HelloProperties {
private String prefix;
private String suffix;
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getSuffix() {
return suffix;
}
public void setSuffix(String suffix) {
this.suffix = suffix;
}
}
xxxService:
public class HelloService {
HelloProperties helloProperties;
public HelloProperties getHelloProperties() {
return helloProperties;
}
public void setHelloProperties(HelloProperties helloProperties) {
this.helloProperties = helloProperties;
}
public String sayHello(String name){
return helloProperties.getPrefix()+"-"+ name+helloProperties.getSuffix();
}
}
4.0.0com.testspring-boot-starter-test0.0.1-SNAPSHOTspring-boot-starter-testDemo project for Spring Boot1.8UTF-8UTF-82.3.0.RELEASEorg.springframework.bootspring-boot-starter-webcom.test.starterspringboot-starter1.0-SNAPSHOTorg.springframework.bootspring-boot-starter-testtestorg.junit.vintagejunit-vintage-engineorg.springframework.bootspring-boot-dependencies${spring-boot.version}pomimportorg.apache.maven.pluginsmaven-compiler-plugin1.81.8UTF-8org.springframework.bootspring-boot-maven-plugin
10.创建controller
@RestController
public class HelloController {
@Autowired
HelloService helloService;
@GetMapping("/hello")
public String hello(){
return helloService.sayHello("hello");
}
}
GetUrlParam:function GetUrlParam(param){
var reg = new RegExp("(^|&)"+ param +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null
==================================================
1、打开PowerDesigner12,在菜单中按照如下方式进行操作
file->Reverse Engineer->DataBase
点击后,弹出 New Physical Data Model 的对话框
2、在General选项卡中
Model name:模板名字,自
网站配置是apache+tomcat,tomcat没有报错,apache报错是:
The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /. Reason: Error reading fr
Free variable A free variable of an expression is a variable that’s used inside the expression but not defined inside the expression. For instance, in the function literal expression (x: Int) => (x
Part Ⅰ:
《阿甘正传》Forrest Gump经典中英文对白
Forrest: Hello! My names Forrest. Forrest Gump. You wanna Chocolate? I could eat about a million and a half othese. My momma always said life was like a box ochocol
Json在数据传输中很好用,原因是JSON 比 XML 更小、更快,更易解析。
在Java程序中,如何使用处理JSON,现在有很多工具可以处理,比较流行常用的是google的gson和alibaba的fastjson,具体使用如下:
1、读取json然后处理
class ReadJSON
{
public static void main(String[] args)