首页 \ 问答 \ 什么是标签注释在pom.xml中的好处?(What are tag comments good for in pom.xml?)

什么是标签注释在pom.xml中的好处?(What are tag comments good for in pom.xml?)

我目前正在浏览https://spring.io/guides/gs/maven/#scratch ,我刚刚找到

<dependencies>
    <!-- tag::joda[] -->
    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.2</version>
    </dependency>
    <!-- end::joda[] -->
    <!-- tag::junit[] -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <!-- end::junit[] -->
</dependencies>

我想知道:

什么是<!-- tag::joda[] -->吗?


I'm currently going through https://spring.io/guides/gs/maven/#scratch and I just found

<dependencies>
    <!-- tag::joda[] -->
    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.2</version>
    </dependency>
    <!-- end::joda[] -->
    <!-- tag::junit[] -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <!-- end::junit[] -->
</dependencies>

and I wonder:

What is <!-- tag::joda[] --> good for?


原文:https://stackoverflow.com/questions/44782273
更新时间:2023-11-03 07:11

最满意答案

比@ SpaceUser7448简化得更像这样:

SELECT 
CASE 
    WHEN 'FIELD1' LIKE 'VAL1' THEN 'M'
    WHEN 'FIELD1' LIKE 'VAL2' THEN 'Q'
    WHEN 'FIELD1' LIKE 'VAL3' THEN 'Y'
    ELSE 'T'
END AS 'VAL4'

Simplified further than @SpaceUser7448 this would look like:

SELECT 
CASE 
    WHEN 'FIELD1' LIKE 'VAL1' THEN 'M'
    WHEN 'FIELD1' LIKE 'VAL2' THEN 'Q'
    WHEN 'FIELD1' LIKE 'VAL3' THEN 'Y'
    ELSE 'T'
END AS 'VAL4'

相关问答

更多
  • 请在外部选择中选择相同。 您不能在同一个查询中访问别名。 SELECT *, (CASE WHEN articleNumber < 2 THEN 'Ama' WHEN articleNumber < 5 THEN 'SemiAma' WHEN articleNumber < 7 THEN 'Good' WHEN articleNumber < 9 THEN 'Better' WHEN articleNumber < 12 ...
  • 也许是这样的? SELECT COUNT(*) FROM .... WHERE ID NOT IN (SELECT DISTINCT ID FROM ...) Maybe something like this? SELECT COUNT(*) FROM .... WHERE ID NOT IN (SELECT DISTINCT ID FROM ...)
  • SELECT Client, CASE WHEN [Closed] <= @GivenDate THEN 'Closed' WHEN [Closing] <= @GivenDate THEN 'Closing' WHEN [Live to Terminal] <= @GivenDate THEN 'Terminal' WHEN [Prospect to Live] <= @GivenDate THEN 'Live' ELSE 'Prospect' END Status FR ...
  • 为什么不直接比较日期? CASE WHEN DATEDIFF(day, FieldDate, GETDATE()) = 0 THEN 1 ELSE 0 END AS tmpDate Why not compare the dates directly? CASE WHEN DATEDIFF(day, FieldDate, GETDATE()) = 0 THEN 1 ELSE 0 END AS tmpDate
  • 我相信CTE会简化你想要做的事情: ;WITH WT AS ( SELECT ReportingDate , PortfolioID , PortfolioNme , CASE WHEN @ReportType = 'GeoCountry' THEN Infoportal.dbo.fn_Generic_ProperCase(Country) WHEN @ReportT ...
  • 不, CASE表达式不能用于控制Transact-SQL语句,语句块,用户定义函数和存储过程的执行流程。 有关流控制方法的列表,请参阅控制流语言(Transact-SQL) 。 No, the CASE expression can not be used to control the flow of execution of Transact-SQL statements, statement blocks, user-defined functions, and stored procedures. F ...
  • select * from [table] where case when var_c = 'something' then var_a else var_b end = '10' SQL小提琴演示 。 select * from [table] where case when var_c = 'something' then var_a else var_b end = '10' SQL Fiddle with demo.
  • 比@ SpaceUser7448简化得更像这样: SELECT CASE WHEN 'FIELD1' LIKE 'VAL1' THEN 'M' WHEN 'FIELD1' LIKE 'VAL2' THEN 'Q' WHEN 'FIELD1' LIKE 'VAL3' THEN 'Y' ELSE 'T' END AS 'VAL4' Simplified further than @SpaceUser7448 this would look like: SELECT CAS ...
  • 不是你描述的方式...... 另一种方法是使用isnull()或coalesce() : select SelectedDate = coalesce(date1,date2) , [Day] = coalesce(day1,day2) , [Hour] = coalesce(hour1,hour2) , [Minute] = coalesce(minute1,minute2) from t Not in the way you are descri ...
  • 根据您的示例,您可能希望使用IF语句(这是ELSE的示例,但您也可以多次使用IF和ELSE IF): declare @searchField varchar(50) declare @searchString varchar(50) declare @searchOper varchar(50) IF @searchField='CompanyName' BEGIN IF @searchOper='eq' BEGIN select * from tbl1 where ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。