小编ste*_*ash的帖子

使用spring boot禁用单元测试的安全性

我正在尝试用安全性创建一个简单的spring boot web项目.我可以正常启动应用程序,安全性正常.但是,我有一些我想要测试的组件没有安全性(或者根本没有测试 - 我根本无法进行测试).

我得到一个异常,表明它找不到ObjectPostProcessor,因此无法启动容器.

引起:org.springframework.beans.factory.NoSuchBeanDefinitionException:找不到类型为[org.springframework.security.config.annotation.ObjectPostProcessor]的限定bean用于依赖

14:01:50.937 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fmpdfApplication.ApplicationSecurity': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.setObjectPostProcessor(org.springframework.security.config.annotation.ObjectPostProcessor); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.security.config.annotation.ObjectPostProcessor] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
    at …

spring-test spring-boot

34
推荐指数
5
解决办法
4万
查看次数

尽管加载了私有pdb文件,WinDBG仍不显示源代码行

我试图使用WinDBG调试本机DLL中的问题.我相信我加载了私有符号,但WinDBG没有显示源代码行或参数信息.这就是我所观察到的; 任何帮助将不胜感激!

我有PDB,我认为它对应于符号搜索路径中的DLL.跑lm我看到:

01050000 01058000   3NMSMTHR C (private pdb symbols)  e:\ads_symbols\3NMSMTHR.pdb
Run Code Online (Sandbox Code Playgroud)

由于这表示"私有pdb符号",我希望这是私有pdb.

我还运行symchk并看到以下输出:

C:\utils\inetmgr\patch01>"c:\Program Files\Debugging Tools for Windows (x86)\symchk.exe" /v 3nmsmthr.dll /s c:\utils\inetmgr\patch01
[SYMCHK] Searching for symbols to C:\utils\inetmgr\patch01\3nmsmthr.dll in path c:\utils\inetmgr\patch01
DBGHELP: Symbol Search Path: c:\utils\inetmgr\patch01
[SYMCHK] Using search path "c:\utils\inetmgr\patch01"
DBGHELP: No header for C:\utils\inetmgr\patch01\3NMSMTHR.DLL.  Searching for image on disk
DBGHELP: C:\utils\inetmgr\patch01\3NMSMTHR.DLL - OK
DBGHELP: 3NMSMTHR - private symbols & lines
     c:\utils\inetmgr\patch01\3NMSMTHR.pdb
[SYMCHK] MODULE64 Info ----------------------
[SYMCHK] Struct size: 1680 bytes
[SYMCHK] Base: 0x10000000
[SYMCHK] Image …
Run Code Online (Sandbox Code Playgroud)

debugging dll windbg

6
推荐指数
1
解决办法
6529
查看次数

标签 统计

debugging ×1

dll ×1

spring-boot ×1

spring-test ×1

windbg ×1