- maven工程使用sonar
tommyhxh
maven项目配置maven的setting.xml文件Maven插件会自动把所需数据(如单元测试结果、静态检测结果等)上传到Sonar服务器上,Sonar的配置并不在每个工程的pom.xml文件里,而是在Maven的配置文件settings.xml里。在标签添加:sonartruejdbc:mysql://10.16.8.96:3306/sonar?useUnicode=true&cha
- Spring Boot应用部署 - JAR包部署
闫小甲
SpringBootspringboot
SpringBoot应用部署采用打包成JAR文件的方式,旨在利用其内置的嵌入式Tomcat或其他Servlet容器,简化传统Web应用部署流程。以下是详细的步骤和说明:1.使用Maven或Gradle进行打包Maven在SpringBoot项目中,确保pom.xml文件已经包含了SpringBootMaven插件。如果未添加,需添加如下配置:org.springframework.bootspri
- SpringBoot 项目 pom.xml 中 设置 Docker Maven 插件
青灯文案
微服务架构springbootxmldocker
在SpringBoot项目中,使用DockerMaven插件(通常是docker-maven-plugin或者fabric8io/docker-maven-plugin)来自动化构建Docker镜像并将其推送到远程仓库。这里分别介绍这两种插件的基本配置,并说明如何设置远程仓库推送。1、使用docker-maven-plugindocker-maven-plugin插件实际上是由spotify提供的
- 运行Maven插件的命令提示插件版本在仓库中找不到
KwokRoot
JavaMavenmavenjava
例:运行mvndependency:copy-dependencies-DoutputDirectory=lib命令出现异常:[WARNING]ThePOMfororg.apache.maven.plugins:maven-dependency-plugin:jar:3.1.2ismissing,nodependencyinformationavailable[WARNING]Failedtore
- Spring-Boot入门(雷丰阳)
baidu_34298344
SpringBootspringbootjavaspring
spring启动原理分析一、spring-Boot启动依赖1、pom文件分析1️⃣maven插件2️⃣Spring-Boot父项目3️⃣spring-boot-starter启动器2、主程序类,主入口类3、使用SpringInitializer快速创建SpringBoot项目二、spring-Boot配置文件1、配置文件2、YAML语法:1️⃣基本语法2️⃣值的写法字面量:普通的值(数字,字符串,
- Servlet JSP-Eclipse安装配置Maven插件
Damon小智
Javajavaeclipsemavenjarjava-eespringservlet
Maven是一款比较常用的Java开发拓展包,它相当于一个全自动jar包管理器,会导入用户开发时需要使用的相应jar包。使用Maven开发Java程序,可以极大提升开发者的开发效率。下面我就跟大家介绍一下如何在Eclipse里安装和配置Maven插件。一、Maven核心功能介绍Maven是一个强大的项目管理和构建工具,旨在简化Java项目的构建、依赖管理和部署过程。它提供了一种结构化的方式来组织项
- springboot-使用assembly进行项目打包
沉沦2014
springboot-maven插件springboot-maven插件repackage目标声明RequiresaMavenprojecttobeexecuted.Requiresdependencyresolutionofartifactsinscope:compile+runtime.Sinceversion:1.1.Bindsbydefaulttothelifecyclephase:pac
- 解决IDEA使用maven插件时乱码
小迷糊紫靈
问题复现:在IDEA使用maven时,经常会出现乱码的情况,如下图:乱码图片解决方案如图将maven运行时vm文件编码设置为本地windows默认编码.解决问题.修改参数解决结果正常显示,不存在乱码了解决结果问题原因中文其编码是windows下的本地编码(GBK)在idea整合的maven中使得默认vm的编码是utf-8.所以出现控制台乱码.
- 分布式springboot 3项目集成mybatis官方生成器开发记录
缘友一世
#mybatis分布式springbootmybatis
文章目录说明实现思路实现步骤第一步:创建generator子模块第二步:引入相关maven插件和依赖第三步:编写生成器配置文件第四步:运行·查看结果说明该文章为作者开发学习记录,方便以后复习和交流主要内容为:分布式springboot3项目集成mybatis官方生成器开发记录,创建单独的generator模块进行单表的domain、mapper和mapper.xml的内容生成这里以Mysql8为案
- maven插件maven-jar-plugin构建jar文件详细使用
老码龙
玩转Mavenmavenjarpycharmjavaidedockerjvm
文章目录前言一、使用方式二、常用配置详解1.classesDirectory2.outputDirectory3.excludes4.includes5.archive添加Implementation和Specification属性添加manifestEntries添加键值对属性ManifestSections自定义manifest配置设置一个可执行的jar文件精确设置Classpath根据目录设
- maven java 如何打纯源码zip包
程序男
java基础专题软件工程专题git&mavenjavamavenpycharm
一、背景打纯源码包给第三方进行安全漏洞扫描二、maven插件项目中加入下面的maven插件maven-source-plugin2.4true*.propertiesfreemarker/*.ftlmapper/*.xmlwebapp/*.xmllicense/*.*compilejar三、使用步骤3.1产出源码jar包ideamaven执行cleancompile命令在target目录下找到*-
- Maven依赖一直报错解决办法
xiangduanjava
mavenjava
如果本地仓库已经下载了依赖包,但是使用maven插件打包还是提示无法找到依赖包,可以试试这个方法在本地仓库依赖包位置,删除掉多余的文件,只留下.jar文件和.pom文件就可以了使用命令删除本地maven仓库文件(*.lastUpdated):for/r%iin(*.lastUpdated)dodel%i删除远程仓库文件(_remote.repositories):for/r%iin(*.repos
- Eclipse导入maven项目或者创建maven项目时,报错Could not calculate build plan: Plugin
豆豆子i
eclipsemavenjava
问题:Eclipse导入maven项目或者创建maven项目时,报错Couldnotcalculatebuildplan:Plugin1.上述问题大概是项目不能加载此maven插件,在pom文件中添加依赖项org.apache.maven.pluginsmaven-resources-plugin2.62.首先先要排除是不是maven配置文件原因:检查自己maven配置文件是否添加阿里云镜像ali
- 在Linux下搭建自己的私有maven库并部署和发布自定义jar依赖和自定义maven插件(三)开发和发布自己开发的maven插件
老码龙
玩转Mavenlinuxmavenjarapachejava中间件
系列文章目录在Linux下搭建自己的私有maven库并部署和发布自定义jar依赖和自定义maven插件(二)发布自己开发的jar包文章目录系列文章目录在Linux下搭建自己的私有maven库并部署和发布自定义jar依赖和自定义maven插件(二)发布自己开发的jar包前言一、插件需求二、maven自定义插件开发1、准备项目2、打包发布二、在项目中使用插件二、测试结果总结前言在上一节中我们分享了怎么
- (五)ATP应用测试平台常用技术栈案例整合——license-maven-plugin插件实现代码一键式版权信息添加
厉害哥哥吖
ATP应用测试平台#工具maven
前言在项目代码开发中,我们会有需求在代码中标识软件的一些版权信息,或者是申请软件著作权中用到版权信息。本小节作者推介一款maven插件,能够通过maven的打包命令或者插件的命令,轻松实现在我们的源码中植入版权信息。那就是我们的license-maven-plugin插件。本小节的演示项目依然使用我们的ATP应用测试平台。欢迎fork哦。正文pom文件中引入license-maven-plugin
- Spring Boot--03--POM.xml文件说明
知行合一。。。
Spring基础知识--SSMspringbootxml后端
SpringBoot框架高级说明1parent标签的作用2关于maven插件的说明3关于Maven属性的配置4关于Maven依赖说明4.1依赖与本地仓库的关系2).本地仓库内容3).规则说明如果以后下载jar包时,遇到maven依赖异常.则首先查询本地仓库中是否有该jar包的完整版本.如果发现jar包文件下载不完全,则需要删除之后重新下载.4.2jar包与jar包之间的依赖传递性说明1.说明:ma
- maven 继承
Mr-Wanter
【JAVA基础知识】mavenjava
文章目录前言一、dependencyManagement一、dependencies传递规则二、引用顺序统一声明三、maven插件默认行为声明四、动态server.name前言系统整理一下用到的maven继承关系一、dependencyManagement版本控制3.2.1org.springframework.bootspring-boot-dependencies${spring-boot.v
- maven插件构建docker镜像报错Caused by: java.net.SocketException: Connection reset by peer: socket write error
代码人生520
mavnemaven
具体报错如下:Causedby:org.apache.http.client.ClientProtocolExceptionatorg.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)atorg.apache.http.impl.client.CloseableHttpClient.e
- idea的maven clean打包无法彻底删除target文件夹问题
weixin_45456834
javamaven
这里写自定义目录标题打包遇到问题废话不多说mvnclean报错,并且手动不能删除target文件夹,显示访问权限问题mvnclean会成功。但是在mvninstall,或者mvnpackage-Dmaven.test.skip=true的时候,会报一个maven插件错误,查询仓库的依赖存在,并且不是残包。后来才发现是因为使用xftp占用tartget文件的问题,将远程的xftp关掉。就OK
- Tomcat在Java web的应用
5-StarrySky
JAVAWEB基础知识javatomcat
Tomcat在Javaweb的应用本来这篇博客顺应之前的内容,应该是需要写Tomcat的简介、基本使用、配置和部署项目、Web的项目结构、创建MavenWeb、idea本地集成以及Tomcat的Maven插件的笔记内容,但是总觉得没必要,因为这些内容网上肯定很多了,而且写这些东西总感觉没啥必要,但是Tomcat做了哪些操作,使得后面开发变得更为简单这件事情,是很必要的,因此基于这一点,我写了这篇博
- Maven:Dmaven.multiModuleProjectDirectory system propery is not set.
dingcho
Javamavenjava
eclipse中使用maven插件的时候,运行runasmavenbuild的时候报错-Dmaven.multiModuleProjectDirectorysystemproperyisnotset.Check$M2_HOMEenvironmentvariableandmvnscriptmatch.直接的解决方法:使用低版本的maven可以设一个环境变量M2_HOME指向你的maven安装目录M2
- docker部署jar包的几种方式
豆浆加糖
javadockerdockerjarjava
docker部署jar包的几种方式前言使用Dockerfile手动打包jar简单打包运行进化:可复用容器究极进化:jdk镜像直接创建可复用容器超究极进化:maven插件打包(不推荐)无聊的进化:maven打包自动推送镜像到指定服务器(不推荐,研发环境随便玩)关于docker容器启动后注册到nacos的ip是docker容器ip问题!总结前言简单记录一下docker打包jar部署的几种方式,避免以后
- 使用Dockerfile为SpringBoot应用构建Docker镜像
Dashesand
springbootdocker后端
使用Dockerfile为SpringBoot应用构建Docker镜像摘要上次写过一篇使用Maven插件为SpringBoot应用构建Docker镜像,讲述了通过docker-maven-plugin来构建docker镜像的方式,此种方式需要依赖自建的Registry镜像仓库。本文将讲述另一种方式,使用Dockerfile来构建docker镜像,此种方式不需要依赖自建的镜像仓库,只需要应用的jar
- 使用IntelliJ IDEA快速搭建springboot 基础模板项目
yrldjsbk
springbootspringbootintellij-ideajava
使用IntelliJIDEA快速搭建springboot基础模板项目!今天和大家分享一下,如何使用IntelliJIDEA里面的maven插件,来快速搭建一个简单的Springboot基础项目。第一步,菜单里面找到,文件-》新建-项目。如图。我们勾选了是maven管理插件包。打包方式选择了,是jar。第二步:下一步,进入插件的勾选,我们选择了,springweb。和前端模板插件(Thymeleaf
- Cursor攻略,吃个螃蟹
天罚神
深度学习springbootjavavscodeidea
Cursor攻略,吃个螃蟹1.1工具下载与安装1.2工具的原理2、Apikey生成与配置2.1生成Apikey2.2设置Apikey3、工具插件多元化使用手册3.1汉化插件3.2SpringBoot、Maven插件(ctrl+shit+x)3.3Git插件(ctrl+shit+x)4、工具功能4.1快捷键4.2ChatGPT提问(ctrl+L)4.3ChatGPT代码分析(ctrl+k)4.4代码
- 在您的Maven项目中使用
咔啡
添加maven插件添加SpringCloudContractBOMorg.springframework.cloudspring-cloud-dependencies${spring-cloud-dependencies.version}pomimport接下来,SpringCloudContractVerifierMaven插件org.springframework.cloudspring-cl
- 使用maven插件启动tomcat服务器
_借东西的小人
有的人启动项目时不希望用自己配置的tomcat启动,而是想用maven自带的插件启动,接下来给大家分享下我用插件启动的过程。在pom.xml中加入下列代码org.apache.tomcat.maventomcat7-maven-plugin2.180/UTF-8tomcat7image.pngimage.png然后访问http://localhost:80即可。image.png
- 【Maven教程】(十五):编写 Maven 插件—— 编写 Maven 插件的一般步骤及案例、Mojo 标注与参数、错误处理和日志 ~
小山code
Maven教程mavenmojojava学习开发语言
Maven·编写Maven插件1️⃣编写Maven插件的一般步骤2️⃣案例:编写一个用于代码行统计的Maven插件3️⃣Mojo标注4️⃣Mojo参数5️⃣错误处理和日志6️⃣测试Maven插件总结前面文章已经讲过,Maven的任何行为都是由插件完成的,包括项目的清理、编译、测试以及打包等操作都有其对应的Maven插件。每个插件拥有一个或者多个目标,用户可以直接从命令行运行这些插件目标,或者选择将
- eclipse中maven项目如何部署到tomcat
文渡
其实maven项目部署到tomcat的方式很多,我从一开始的打war包到tomcat/webapps目录,到使用tomcat-maven插件,到直接使用servers部署,一路来走过很多弯路。下面就一一介绍这几种部署方式:1.打war包到tomcat/webapps目录这种方式其实跟非maven项目没什么区别,就是打包的方式不同之后在target目录下会生成war包,复制到tomcat/webap
- 六使用Maven插件构建Docker镜像
JavaNice哥
dcokermavendockerjava
使用Maven插件构建Docker镜像我们知道,Maven是一个强大的项目管理与构建工具。如果可以使用Maven构建Docker镜像,那么我们的工作就能得到进一步的简化。经过调研,以下几款Maven的Docker插件进入笔者视野,如表13-1所示。插件名称官方地址docker-maven-pluginhttps://github.com/spotify/docker-maven-plugindoc
- Java序列化进阶篇
g21121
java序列化
1.transient
类一旦实现了Serializable 接口即被声明为可序列化,然而某些情况下并不是所有的属性都需要序列化,想要人为的去阻止这些属性被序列化,就需要用到transient 关键字。
- escape()、encodeURI()、encodeURIComponent()区别详解
aigo
JavaScriptWeb
原文:http://blog.sina.com.cn/s/blog_4586764e0101khi0.html
JavaScript中有三个可以对字符串编码的函数,分别是: escape,encodeURI,encodeURIComponent,相应3个解码函数:,decodeURI,decodeURIComponent 。
下面简单介绍一下它们的区别
1 escape()函
- ArcgisEngine实现对地图的放大、缩小和平移
Cb123456
添加矢量数据对地图的放大、缩小和平移Engine
ArcgisEngine实现对地图的放大、缩小和平移:
个人觉得是平移,不过网上的都是漫游,通俗的说就是把一个地图对象从一边拉到另一边而已。就看人说话吧.
具体实现:
一、引入命名空间
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Controls;
二、代码实现.
- Java集合框架概述
天子之骄
Java集合框架概述
集合框架
集合框架可以理解为一个容器,该容器主要指映射(map)、集合(set)、数组(array)和列表(list)等抽象数据结构。
从本质上来说,Java集合框架的主要组成是用来操作对象的接口。不同接口描述不同的数据类型。
简单介绍:
Collection接口是最基本的接口,它定义了List和Set,List又定义了LinkLi
- 旗正4.0页面跳转传值问题
何必如此
javajsp
跳转和成功提示
a) 成功字段非空forward
成功字段非空forward,不会弹出成功字段,为jsp转发,页面能超链接传值,传输变量时需要拼接。接拼接方式list.jsp?test="+strweightUnit+"或list.jsp?test="+weightUnit+&qu
- 全网唯一:移动互联网服务器端开发课程
cocos2d-x小菜
web开发移动开发移动端开发移动互联程序员
移动互联网时代来了! App市场爆发式增长为Web开发程序员带来新一轮机遇,近两年新增创业者,几乎全部选择了移动互联网项目!传统互联网企业中超过98%的门户网站已经或者正在从单一的网站入口转向PC、手机、Pad、智能电视等多端全平台兼容体系。据统计,AppStore中超过85%的App项目都选择了PHP作为后端程
- Log4J通用配置|注意问题 笔记
7454103
DAOapachetomcatlog4jWeb
关于日志的等级 那些去 百度就知道了!
这几天 要搭个新框架 配置了 日志 记下来 !做个备忘!
#这里定义能显示到的最低级别,若定义到INFO级别,则看不到DEBUG级别的信息了~!
log4j.rootLogger=INFO,allLog
# DAO层 log记录到dao.log 控制台 和 总日志文件
log4j.logger.DAO=INFO,dao,C
- SQLServer TCP/IP 连接失败问题 ---SQL Server Configuration Manager
darkranger
sqlcwindowsSQL ServerXP
当你安装完之后,连接数据库的时候可能会发现你的TCP/IP 没有启动..
发现需要启动客户端协议 : TCP/IP
需要打开 SQL Server Configuration Manager...
却发现无法打开 SQL Server Configuration Manager..??
解决方法: C:\WINDOWS\system32目录搜索framedyn.
- [置顶] 做有中国特色的程序员
aijuans
程序员
从出版业说起 网络作品排到靠前的,都不会太难看,一般人不爱看某部作品也是因为不喜欢这个类型,而此人也不会全不喜欢这些网络作品。究其原因,是因为网络作品都是让人先白看的,看的好了才出了头。而纸质作品就不一定了,排行榜靠前的,有好作品,也有垃圾。 许多大牛都是写了博客,后来出了书。这些书也都不次,可能有人让为不好,是因为技术书不像小说,小说在读故事,技术书是在学知识或温习知识,有些技术书读得可
- document.domain 跨域问题
avords
document
document.domain用来得到当前网页的域名。比如在地址栏里输入:javascript:alert(document.domain); //www.315ta.com我们也可以给document.domain属性赋值,不过是有限制的,你只能赋成当前的域名或者基础域名。比如:javascript:alert(document.domain = "315ta.com");
- 关于管理软件的一些思考
houxinyou
管理
工作好多看年了,一直在做管理软件,不知道是我最开始做的时候产生了一些惯性的思维,还是现在接触的管理软件水平有所下降.换过好多年公司,越来越感觉现在的管理软件做的越来越乱.
在我看来,管理软件不论是以前的结构化编程,还是现在的面向对象编程,不管是CS模式,还是BS模式.模块的划分是很重要的.当然,模块的划分有很多种方式.我只是以我自己的划分方式来说一下.
做为管理软件,就像现在讲究MVC这
- NoSQL数据库之Redis数据库管理(String类型和hash类型)
bijian1013
redis数据库NoSQL
一.Redis的数据类型
1.String类型及操作
String是最简单的类型,一个key对应一个value,string类型是二进制安全的。Redis的string可以包含任何数据,比如jpg图片或者序列化的对象。
Set方法:设置key对应的值为string类型的value
- Tomcat 一些技巧
征客丶
javatomcatdos
以下操作都是在windows 环境下
一、Tomcat 启动时配置 JAVA_HOME
在 tomcat 安装目录,bin 文件夹下的 catalina.bat 或 setclasspath.bat 中添加
set JAVA_HOME=JAVA 安装目录
set JRE_HOME=JAVA 安装目录/jre
即可;
二、查看Tomcat 版本
在 tomcat 安装目
- 【Spark七十二】Spark的日志配置
bit1129
spark
在测试Spark Streaming时,大量的日志显示到控制台,影响了Spark Streaming程序代码的输出结果的查看(代码中通过println将输出打印到控制台上),可以通过修改Spark的日志配置的方式,不让Spark Streaming把它的日志显示在console
在Spark的conf目录下,把log4j.properties.template修改为log4j.p
- Haskell版冒泡排序
bookjovi
冒泡排序haskell
面试的时候问的比较多的算法题要么是binary search,要么是冒泡排序,真的不想用写C写冒泡排序了,贴上个Haskell版的,思维简单,代码简单,下次谁要是再要我用C写冒泡排序,直接上个haskell版的,让他自己去理解吧。
sort [] = []
sort [x] = [x]
sort (x:x1:xs)
| x>x1 = x1:so
- java 路径 配置文件读取
bro_feng
java
这几天做一个项目,关于路径做如下笔记,有需要供参考。
取工程内的文件,一般都要用相对路径,这个自然不用多说。
在src统计目录建配置文件目录res,在res中放入配置文件。
读取文件使用方式:
1. MyTest.class.getResourceAsStream("/res/xx.properties")
2. properties.load(MyTest.
- 读《研磨设计模式》-代码笔记-简单工厂模式
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
package design.pattern;
/*
* 个人理解:简单工厂模式就是IOC;
* 客户端要用到某一对象,本来是由客户创建的,现在改成由工厂创建,客户直接取就好了
*/
interface IProduct {
- SVN与JIRA的关联
chenyu19891124
SVN
SVN与JIRA的关联一直都没能装成功,今天凝聚心思花了一天时间整合好了。下面是自己整理的步骤:
一、搭建好SVN环境,尤其是要把SVN的服务注册成系统服务
二、装好JIRA,自己用是jira-4.3.4破解版
三、下载SVN与JIRA的插件并解压,然后拷贝插件包下lib包里的三个jar,放到Atlassian\JIRA 4.3.4\atlassian-jira\WEB-INF\lib下,再
- JWFDv0.96 最新设计思路
comsci
数据结构算法工作企业应用公告
随着工作流技术的发展,工作流产品的应用范围也不断的在扩展,开始进入了像金融行业(我已经看到国有四大商业银行的工作流产品招标公告了),实时生产控制和其它比较重要的工程领域,而
- vi 保存复制内容格式粘贴
daizj
vi粘贴复制保存原格式不变形
vi是linux中非常好用的文本编辑工具,功能强大无比,但对于复制带有缩进格式的内容时,粘贴的时候内容错位很严重,不会按照复制时的格式排版,vi能不能在粘贴时,按复制进的格式进行粘贴呢? 答案是肯定的,vi有一个很强大的命令可以实现此功能 。
在命令模式输入:set paste,则进入paste模式,这样再进行粘贴时
- shell脚本运行时报错误:/bin/bash^M: bad interpreter 的解决办法
dongwei_6688
shell脚本
出现原因:windows上写的脚本,直接拷贝到linux系统上运行由于格式不兼容导致
解决办法:
1. 比如文件名为myshell.sh,vim myshell.sh
2. 执行vim中的命令 : set ff?查看文件格式,如果显示fileformat=dos,证明文件格式有问题
3. 执行vim中的命令 :set fileformat=unix 将文件格式改过来就可以了,然后:w
- 高一上学期难记忆单词
dcj3sjt126com
wordenglish
honest 诚实的;正直的
argue 争论
classical 古典的
hammer 锤子
share 分享;共有
sorrow 悲哀;悲痛
adventure 冒险
error 错误;差错
closet 壁橱;储藏室
pronounce 发音;宣告
repeat 重做;重复
majority 大多数;大半
native 本国的,本地的,本国
- hibernate查询返回DTO对象,DTO封装了多个pojo对象的属性
frankco
POJOhibernate查询DTO
DTO-数据传输对象;pojo-最纯粹的java对象与数据库中的表一一对应。
简单讲:DTO起到业务数据的传递作用,pojo则与持久层数据库打交道。
有时候我们需要查询返回DTO对象,因为DTO
- Partition List
hcx2013
partition
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of th
- Spring MVC测试框架详解——客户端测试
jinnianshilongnian
上一篇《Spring MVC测试框架详解——服务端测试》已经介绍了服务端测试,接下来再看看如果测试Rest客户端,对于客户端测试以前经常使用的方法是启动一个内嵌的jetty/tomcat容器,然后发送真实的请求到相应的控制器;这种方式的缺点就是速度慢;自Spring 3.2开始提供了对RestTemplate的模拟服务器测试方式,也就是说使用RestTemplate测试时无须启动服务器,而是模拟一
- 关于推荐个人观点
liyonghui160com
推荐系统关于推荐个人观点
回想起来,我也做推荐了3年多了,最近公司做了调整招聘了很多算法工程师,以为需要多么高大上的算法才能搭建起来的,从实践中走过来,我只想说【不是这样的】
第一次接触推荐系统是在四年前入职的时候,那时候,机器学习和大数据都是没有的概念,什么大数据处理开源软件根本不存在,我们用多台计算机web程序记录用户行为,用.net的w
- 不间断旋转的动画
pangyulei
动画
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat: M
- 自定义annotation
sha1064616837
javaenumannotationreflect
对象有的属性在页面上可编辑,有的属性在页面只可读,以前都是我们在页面上写死的,时间一久有时候会混乱,此处通过自定义annotation在类属性中定义。越来越发现Java的Annotation真心很强大,可以帮我们省去很多代码,让代码看上去简洁。
下面这个例子 主要用到了
1.自定义annotation:@interface,以及几个配合着自定义注解使用的几个注解
2.简单的反射
3.枚举
- Spring 源码
up2pu
spring
1.Spring源代码
https://github.com/SpringSource/spring-framework/branches/3.2.x
注:兼容svn检出
2.运行脚本
import-into-eclipse.bat
注:需要设置JAVA_HOME为jdk 1.7
build.gradle
compileJava {
sourceCompatibilit
- 利用word分词来计算文本相似度
yangshangchuan
wordword分词文本相似度余弦相似度简单共有词
word分词提供了多种文本相似度计算方式:
方式一:余弦相似度,通过计算两个向量的夹角余弦值来评估他们的相似度
实现类:org.apdplat.word.analysis.CosineTextSimilarity
用法如下:
String text1 = "我爱购物";
String text2 = "我爱读书";
String text3 =