package com.ikeeper.config;
import com.ikeeper.properties.MyAutoProperties;
import com.ikeeper.service.DemoService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableConfigurationProperties({MyAutoProperties.class})
public class MyAutoBeanConfig {
@Bean
public DemoService demoService(MyAutoProperties myAutoProperties){
DemoService demoService = new DemoService();
demoService.setMyAutoProperties(myAutoProperties);
return demoService;
}
}
4.配置类
package com.ikeeper.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix ="my.auto")
public class MyAutoProperties {
private int point;
public int getPoint() {
return point;
}
public void setPoint(int point) {
this.point = point;
}
}
5:service
package com.ikeeper.service;
import com.ikeeper.properties.MyAutoProperties;
public class DemoService {
private MyAutoProperties myAutoProperties;
public String hi(String name){
return "hello:"+name + "."+myAutoProperties.getPoint();
}
public void setMyAutoProperties(MyAutoProperties myAutoProperties) {
this.myAutoProperties = myAutoProperties;
}
}
为什么 θ i \theta_i θi的取值会造成远程衰减性
旋转位置编码的出发点为:通过绝对位置编码的方式实现相对位置编码。
对词向量 q \boldsymbol{q} q添加绝对位置信息 m m m,希望找到一种函数 f f f,使得: < f ( q , m ) …
搭建Ubuntu环境
在嵌入式开发中,很多开发者习惯于使用Windows进行代码的编辑,比如使用Windows的Visual Studio Code进行OpenHarmony代码的开发。但当前阶段,大部分的开发板源码还不支持在Windows环境下进行编译,如Hi3861、Hi3516…
文章目录 一、关于command ‘leetcode.signin‘ not found的问题二、解决方案第一,没有下载Nodejs;第二,有没有在VScode中配置Nodejs第三,力扣的默认在VScode请求地址中请求头错误首先搞定配置其次搞定登入登入方法一:…