当前位置: 首页 > news >正文

做神马网站优化排名软网页界面

做神马网站优化排名软,网页界面,wordpress官网密码错误,seo优化厂家springBoot 集成Neo4j 实战演示#xff0c;今天分享一下#xff1a;JDK11环境下1、pom文件!-- 1. 继承Spring Boot Starter Parent --!-- 这是Spring Boot Maven项目的标准方式#xff0c;它提供了默认的依赖管理和插件配置 --parentgroupId今天分享一下JDK11环境下1、pom文件 !-- 1. 继承Spring Boot Starter Parent --!-- 这是Spring Boot Maven项目的标准方式它提供了默认的依赖管理和插件配置 --parentgroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-parent/artifactIdversion2.2.2.RELEASE/versionrelativePath/ !-- 从仓库查找父pom不本地查找 --/parent!-- 这些依赖的版本由spring-boot-starter-parent统一管理通常无需显式指定版本 --dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-data-neo4j/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependency2、yml配置 datasource:host: localhostport: 7687username: neo4jpassword: 123456management:endpoint:health:show-details: alwayslogging:level:org.neo4j.ogm.drivers.bolt.request: DEBUGorg.springframework.data.neo4j: DEBUG3、代码核心配置import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories;EnableNeo4jRepositories(ru.vladigeras.springneo4j.repository) EntityScan(basePackages ru.vladigeras.springneo4j.model) Configuration public class Neo4jConfiguration {Value(${datasource.host})private String host;Value(${datasource.port})private String port;Value(${datasource.username})private String username;Value(${datasource.password})private String password;Beanpublic org.neo4j.ogm.config.Configuration configuration() {return new org.neo4j.ogm.config.Configuration.Builder().uri(bolt:// host : port).credentials(username, password).build();} } 4、查询接口配置和实现 Repository public interface LineRepository extends Neo4jRepositoryLineNode, Long { }#业务接口 ListLineNode getLines();#实现 Transactional(readOnly true)Overridepublic ListLineNode getLines() {ListLineNode result new ArrayList();IteratorLineNode iterator lineRepository.findAll().iterator();iterator.forEachRemaining(result::add);return result;}#控制侧ApiOperation(GetLines)GetMapping(/lines)ResponseStatus(HttpStatus.OK)public ListLine getLines() {return stationService.getLines().stream().map(StationMapper::of).collect(Collectors.toList());}#实体import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty;ApiModel(description Line info) public class Line {ApiModelProperty(identifier)private Long id;ApiModelProperty(line name)private String name;public Long getId() {return id;}public Line setId(Long id) {this.id id;return this;}public String getName() {return name;}public Line setName(String name) {this.name name;return this;} } 5新增接口配置实现 #控制层 ApiOperation(CreateLine)PostMapping(/lines)ResponseStatus(HttpStatus.CREATED)public void add(ApiParam(Line info)RequestBody NewLine line) {stationService.save(line);}#voimport io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty;ApiModel(description Line info) public class NewLine {ApiModelProperty(line name)private String name;public String getName() {return name;}public NewLine setName(String name) {this.name name;return this;} }#接口 void save(NewLine line);#接口实现TransactionalOverridepublic void save(NewLine line) {LineNode lineNode new LineNode();lineNode.setName(line.getName());lineRepository.save(lineNode);}6、启动类import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;SpringBootApplication public class SpringNeo4jApplication {public static void main(String[] args) {SpringApplication.run(SpringNeo4jApplication.class, args);}} 启动成功就可以演示了。
http://www.zqtcl.cn/news/128340/

相关文章:

  • 广州高档网站建设电子商务网站建设的期中考试
  • 九江建设公司网站新网 网站空间
  • 网站开发时的闭包写法手机网站创建站点成功
  • 中山做网站联系电话可以做全景的网站
  • 南京网站开发推南京乐识网络站点推广的方法有哪些
  • 沧州企业网站深圳建筑招聘网
  • 汽车网站开发的需求分析怎样策划一个营销型网站
  • 网站建设公司彩铃网站模板是怎么制作
  • 代做毕设网站推荐一键安装微信
  • 网站建设评比标准人工智能的网站
  • 网站 提示建设中计算机网站建设和维护
  • 网站菜单分类怎么做wordpress黄页插件
  • 安防网站下载营销型网站建设 高校邦
  • 一个几个人做网站的几个故事电影网站开发设计的完成情况
  • 如何开个人网站网站建设技能考试试题三
  • 做网站都要学什么工程造价询价网站
  • 东莞市官网网站建设企业福田做商城网站建设哪家服务周到
  • 网站界面设计技巧宁波seo排名优化价格
  • 做外贸经常用的网站需要优化的网站有哪些
  • 俄语网站建设注意事项seo公司优化排名
  • jsp做的当当网站的文档专业电子科技网站建设
  • 有免费的微网站是什么推广普通话调查问卷
  • 滁州市南谯区住房和建设局网站网站服务器规划 用户数
  • 静态企业网站源码网站sem托管
  • 17网站一起做网店打不开专业做网站公司 前景
  • 哪个网站可以做围棋作业游览有关小城镇建设的网站
  • 这么建立com的网站开发公司以现金方式补贴给客户
  • 网站建设 常见问题wordpress 手机顶部菜单
  • 医院网站 功能系统开发文档
  • 免费的企业网站网站空间商排名