Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

Java服务端开发记录

新建项目

IDEA:New -> Project -> Maven -> 勾选Create form archetype -> 选择maven-archetype-quickstart

IDEA Settings

(1)配置为本地Maven

settings.xml配置参考

<settings>
  <localRepository>E:/Library/MavenRepository</localRepository>

  <pluginGroups>
    <pluginGroup>org.mule.tools</pluginGroup>
  </pluginGroups>

  <servers>
    <server>
      <id>snapshots</id>
      <username>yezhou</username>
      <password>123456</password>
    </server>
    <server>
      <id>releases</id>
      <username>yezhou</username>
      <password>123456</password>
    </server>
  </servers>

  <mirrors>
    <mirror>
      <id>nexus-public-snapshots</id>
      <mirrorOf>public-snapshots</mirrorOf>
      <url>http://rp.yezhou.me/repository/public-snapshots/</url>
    </mirror>

    <mirror>
      <!--This sends everything else to /public -->
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://rp.yezhou.me/repository/public/</url>
    </mirror>
  </mirrors>

  <profiles>
    <profile>
      <id>nexus</id>
      <repositories>
        <repository>
          <id>public</id>
          <!--<url>http://220.189.210.141:10080/nexus/content/groups/public/</url>-->
          <url>http://public</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
        <repository>
          <id>public-snapshots</id>
          <!--<url>http://220.189.210.141:10080/nexus/content/groups/public-snapshots/</url>-->
          <url>http://public-snapshots</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>public</id>
          <!--<url>http://220.189.210.141:10080/nexus/content/groups/public/</url>-->
          <url>http://public</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
        <pluginRepository>
          <id>public-snapshots</id>
          <!--<url>http://220.189.210.141:10080/nexus/content/groups/public-snapshots/</url>-->
          <url>http://public-snapshots</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

</settings> 

IDEA Run/Debug Configurations

(1)配置:Name
(2)Server选项卡:添加Local Tomcat
(3)Deployment选项卡:添加Artifact

Dubbo服务调用

applicationContext-dubbo-consumer.xml

<dubbo:reference id="userService" interface="cn.appblog.service.UserService" />
@Autowired
private UserService userService;

...() {
  userService.findUserById("xxx");
}
上一篇 Windows平台搭建Kafka在和简单示例
下一篇 SpringMVC+JSP中关于JQuery ajax提交的Content-Type参数设置application/json和application/x-www-form-urlencoded区别