( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0001484112{main}( ).../index.php:0
20.0137484464require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.11764101032require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.11814130136include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.11814130136get_header( $name = ???, $args = ??? ).../archive.php:19
60.11814130352locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.11814130448load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.11814130992require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.11824138400wp_head( ).../header.php:18
100.11824138400do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.11824138616WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.11824138616WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.11844142032wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.11844142032do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.11844142248WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.11844142248WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.11864268552twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.11874270072wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.11874270072WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.11874270072WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.11874270072_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.11874270392wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.11884271144trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0001484112{main}( ).../index.php:0
20.0137484464require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.11764101032require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.11814130136include( '/var/www/html/wp-content/themes/twentyfifteen/archive.php ).../template-loader.php:125
50.11814130136get_header( $name = ???, $args = ??? ).../archive.php:19
60.11814130352locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.11814130448load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.11814130992require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.11824138400wp_head( ).../header.php:18
100.11824138400do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.11824138616WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.11824138616WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.11844142032wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.11844142032do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.11844142248WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.11844142248WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.11864268552twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.14604272248wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.14604272248WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.14604272248WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.14604272248_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.14604272568wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.14614272792trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

Google Guice Example

最近在研究Google 的 Guice,感觉用起来挺简单的,入门应该比Spring要容易的多,这也许是因为Guice刚刚出世,很功能还没有完善吧,但据说Google内部已经在用了,我想再过一段时间取Spring而代之也不是没有可能,至少也能跟Spring平分天下吧。

下面是一个简单的小实例

1.业务逻辑接口

package com.hawkunion.guice;

/**

*

* @author 杜庆明

*/

public interface Work {

     public void sayHello(String userName);

}

2.实现接口的业务逻辑

package com.hawkunion.guice;

/**

*

* @author 杜庆明

*/

public class WorkImpl implements Work{

   

     public void sayHello(String userName) {

         System.out.println(“Hello! 欢迎你:”+userName);

     }

   

}

3.要用到业务逻辑的类

package com.hawkunion.guice;

import com.google.inject.Inject;

/**

*

* @author 杜庆明

*/

public class RunWorkClass {

   

     private Work work = null;

   

     @Inject

     public void setWork(Work workimpl){

         this.work = workimpl;

     }

   

     public void runWork(){

         work.sayHello(“阿杜”);

     }   

}

4.Module

package com.hawkunion.guice;

import com.google.inject.Binder;

import com.google.inject.Module;

/**

*

* @author 杜庆明

*/

public class MyModule implements Module {

     public void configure(Binder binder) {

         binder.bind(Work.class).to(WorkImpl.class);

     }

}

5.测试

package com.hawkunion.guice;

import com.google.inject.Guice;

import com.google.inject.Injector;

import com.google.inject.Module;

/**

*

* @author 杜庆明

*/

public class TestWork {

   

     public static void main(String args[]){

         RunWorkClass runWorkClass = new RunWorkClass();

         Module module = new MyModule();

       

         Injector in = Guice.createInjector(module);//把module给Guice

         in.injectMembers(runWorkClass);//让Guice把需要注入的业务逻辑注入给对象

         runWorkClass.runWork();//   运行work

     }

}