idea自动添加版权许可证信息

idea设置版权许可证, 本例以apache2为例

  1. 新建名为apache2的模板

    在这里插入图片描述

  2. 将以下内容中的[name of copyright owner]替换成你自己后, 复制到Copyright text, 点击Apply

    Copyright $today.year [name of copyright owner]
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    

    在这里插入图片描述

  3. 应用许可证到当前项目

    在这里插入图片描述

    在这里插入图片描述

  4. 新建一个类, 可看到已自动添加版权许可证


版权声明:本文为varyuan原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。